1 | <?php |
||
14 | final class Zip64ExtendedInformation implements ExtraFieldInterface |
||
15 | { |
||
16 | const ID = 0x0001; |
||
17 | |||
18 | const MIN_SIZE = 4; |
||
19 | const MAX_SIZE = 32; |
||
20 | |||
21 | /** |
||
22 | * Original uncompressed file size |
||
23 | * @var int |
||
24 | */ |
||
25 | private $originalSize; |
||
26 | |||
27 | /** |
||
28 | * Size of compressed data |
||
29 | * @var int |
||
30 | */ |
||
31 | private $compressedSize; |
||
32 | |||
33 | /** |
||
34 | * Offset of local header record |
||
35 | * @var int |
||
36 | */ |
||
37 | private $relativeHeaderOffset; |
||
38 | |||
39 | /** |
||
40 | * Number of the disk on which this file starts |
||
41 | * @var int |
||
42 | */ |
||
43 | private $diskStartNumber; |
||
44 | |||
45 | 2161 | public function __construct(int $originalSize = null, int $compressedSize = null, int $relativeHeaderOffset = null, int $diskStartNumber = null) |
|
52 | |||
53 | 1082 | public static function parse(string $input, $context = null) |
|
97 | |||
98 | 1080 | public function getHeaderId() |
|
102 | |||
103 | 1080 | public function getDataSize() |
|
111 | |||
112 | 1080 | public function getData() |
|
120 | |||
121 | /** |
||
122 | * @return int|null |
||
123 | */ |
||
124 | 1081 | public function getOriginalSize() |
|
128 | |||
129 | /** |
||
130 | * @param int $originalSize |
||
131 | * @return Zip64ExtendedInformation |
||
132 | */ |
||
133 | 1 | public function setOriginalSize(int $originalSize): Zip64ExtendedInformation |
|
139 | |||
140 | /** |
||
141 | * @return int|null |
||
142 | */ |
||
143 | 1081 | public function getCompressedSize() |
|
147 | |||
148 | /** |
||
149 | * @param int $compressedSize |
||
150 | * @return Zip64ExtendedInformation |
||
151 | */ |
||
152 | 1 | public function setCompressedSize(int $compressedSize): Zip64ExtendedInformation |
|
158 | |||
159 | /** |
||
160 | * @return int|null |
||
161 | */ |
||
162 | 1081 | public function getRelativeHeaderOffset() |
|
166 | |||
167 | /** |
||
168 | * @param int $relativeHeaderOffset |
||
169 | * @return Zip64ExtendedInformation |
||
170 | */ |
||
171 | 1 | public function setRelativeHeaderOffset(int $relativeHeaderOffset): Zip64ExtendedInformation |
|
177 | |||
178 | /** |
||
179 | * @return int|null |
||
180 | */ |
||
181 | 1081 | public function getDiskStartNumber() |
|
185 | |||
186 | /** |
||
187 | * @param int $diskStartNumber |
||
188 | * @return Zip64ExtendedInformation |
||
189 | */ |
||
190 | 1 | public function setDiskStartNumber(int $diskStartNumber): Zip64ExtendedInformation |
|
196 | } |
||
197 |