package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -55,12 +55,12 @@ final class CharacterStream
"\xf8" => 5, "\xf9" => 5, "\xfa" => 5, "\xfb" => 5, "\xfc" => 6, "\xfd" => 6, "\xfe" => 0, "\xff" => 0,
];
private $data = '';
private $dataSize = 0;
private $map = [];
private $charCount = 0;
private $currentPos = 0;
private $fixedWidth = 0;
private string $data = '';
private int $dataSize = 0;
private array $map = [];
private int $charCount = 0;
private int $currentPos = 0;
private int $fixedWidth = 0;
/**
* @param resource|string $input
@@ -72,29 +72,22 @@ final class CharacterStream
$this->fixedWidth = 0;
$this->map = ['p' => [], 'i' => []];
} else {
switch ($charset) {
$this->fixedWidth = match ($charset) {
// 16 bits
case 'ucs2':
case 'ucs-2':
case 'utf16':
case 'utf-16':
$this->fixedWidth = 2;
break;
// 32 bits
case 'ucs4':
case 'ucs-4':
case 'utf32':
case 'utf-32':
$this->fixedWidth = 4;
break;
// 7-8 bit charsets: (us-)?ascii, (iso|iec)-?8859-?[0-9]+, windows-?125[0-9], cp-?[0-9]+, ansi, macintosh,
'ucs2',
'ucs-2',
'utf16',
'utf-16' => 2,
// 32 bits
'ucs4',
'ucs-4',
'utf32',
'utf-32' => 4,
// 7-8 bit charsets: (us-)?ascii, (iso|iec)-?8859-?[0-9]+, windows-?125[0-9], cp-?[0-9]+, ansi, macintosh,
// koi-?7, koi-?8-?.+, mik, (cork|t1), v?iscii
// and fallback
default:
$this->fixedWidth = 1;
}
// and fallback
default => 1,
};
}
if (\is_resource($input)) {
$blocks = 16372;