136 Commits
Author SHA1 Message Date
Timofey Solomko d5c8600137 Use more new BBD functions 2018-04-10 22:37:20 +03:00
Timofey Solomko 05852b179b Use new int(fromBytes:) function 2018-04-10 22:37:16 +03:00
Timofey Solomko 1d838c1d7e Slightly simplify and improve certain code 2018-04-07 13:38:00 +03:00
Timofey Solomko d4b728125b [docs] Add documentation for ZIP custom extra fields related APIs 2018-03-31 13:46:04 +03:00
Timofey Solomko 756cf23659 [ZIP] Add preconditions which check custom extra fields properties 2018-03-31 12:25:18 +03:00
Timofey Solomko f5924af1c4 [ZIP] Correctly skip Info-ZIP Unix extra field in Central Directory 2018-03-31 12:25:18 +03:00
Timofey Solomko 0dc93bb077 [ZIP] Make names of properties of Standard extra fields shorter 2018-03-31 12:25:18 +03:00
Timofey Solomko e35ea703dc [ZIP] Add support for custom extra fields 2018-03-31 12:25:17 +03:00
Timofey Solomko 6ae80d98a6 [ZIP] Use new Standard Extra Field structs in central directory, local header and entry info 2018-03-31 12:25:17 +03:00
Timofey Solomko de0fcec3cc [ZIP] Add structs for all "standard" extra fields
These "standard" extra fields are already implemented in LocalHeader/CDEntry.
2018-03-31 12:25:17 +03:00
Timofey Solomko afa5799df2 [ZIP] Add ZipExtraField protocol and ZipExtraFieldLocation enum 2018-03-31 12:25:17 +03:00
Timofey Solomko 112fa8bbb0 Date init from ntfs timestamp is no longer failable
The only reason for it to be was to propagate optionality of UInt64 argument. Instead we can if-let ntfs timestamp and call this initializer with non-optional argument. We also now force-unwrap ntfsReferenceDate, since it is likely to be a system problem if we cannot create definetely correct date from its components.
2018-03-25 23:42:53 +03:00
Timofey Solomko 309a07ed15 [docs] Slightly simplify notes about entries order of container functions 2018-03-17 15:37:41 +03:00
Timofey Solomko 4888f37f0f Revert addition of BBD-related public APIs to Zlib, LZMA and BZip2 2018-03-02 23:32:39 +03:00
Timofey Solomko 8b4ff5c040 [BZip2] Make decompress(_ bitReader:) function public and add "from" label to its argument 2018-02-23 12:58:24 +03:00
Timofey Solomko 3d502071bb [ZIP] Use new BBD's converting inits when decompressing 2018-02-23 12:58:24 +03:00
Timofey Solomko f95b8116f2 [ZIP] Add public API for accessing uid and gid
These APIs are: ZipEntryInfo.ownerID and groupID (named for consistency with TarEntryInfo).
2018-02-21 23:14:44 +03:00
Timofey Solomko 146162132b [ZIP] Add internal support for Info-ZIP New unix extra field (0x7875) 2018-02-21 23:08:07 +03:00
Timofey Solomko 8315018de6 [ZIP] Add internal support for Info-ZIP unix extra field (0x7855) 2018-02-21 22:57:53 +03:00
Timofey Solomko d7390ec44f [ZIP] Native time and date are now relative to current timezone and calendar used by system 2018-01-28 19:58:40 +03:00
Timofey Solomko 2be06c8c0a Use ByteReader in all ZIP-related code
We can do this since we don't have asynchronous concerns anymore.
2018-01-07 15:12:59 +03:00
Timofey Solomko e714dc308b Updated copyright year to 2018 2018-01-03 19:44:18 +03:00
Timofey Solomko e986561487 Replace Int() conversions with toInt() functions 2018-01-03 19:22:15 +03:00
Timofey Solomko c8d92e56d3 Replace BitReader and ByteReader with BitByteData's implementations 2018-01-03 19:22:15 +03:00
Timofey Solomko 20ab480737 Complete renaming of DataWithPointer to ByteReader
This includes renaming pointerData variables to byteReader as well as renaming of files with extensions to ByteReader.
2018-01-03 19:22:14 +03:00
Timofey Solomko b9eeb1bc7c Rename ByteReader.index to offset 2018-01-03 19:22:13 +03:00
Timofey Solomko 3751e25c4f Rename DataWithPointer to ByteReader
This and following commits should ease switch to BitByteData usage.
2018-01-03 19:22:13 +03:00
Timofey Solomko e05f917210 Improve compile time 2017-12-24 14:57:35 +03:00
Timofey Solomko 13d411e47c Optimise zip's needsUtf8 function 2017-12-24 14:57:34 +03:00
Timofey Solomko a447e6adcf Don't check unicodeness of zip strings if language encoding flags is set 2017-11-22 23:04:21 +03:00
Timofey Solomko b9cebf13e9 Remove dwp functions with count argument 2017-11-22 22:08:02 +03:00
Timofey Solomko 556e42e179 Add and update documentation 2017-11-14 20:37:20 +03:00
Timofey Solomko 60ad7a15b9 Fix build problem on linux 2017-11-11 13:43:58 +03:00
Timofey Solomko 8cf85305d4 ContainerEntryInfo.name is no longer Optional 2017-11-11 13:27:36 +03:00
Timofey Solomko 1164d8eafb Extract new DWP zip string extension into a separate file and rename remaning file 2017-11-11 13:05:12 +03:00
Timofey Solomko 8114e55285 Make ZipCommon.getStringField function as an extension of DataWithPointer 2017-11-11 12:59:54 +03:00
Timofey Solomko feb41deed1 Return Data instead of UInt8 arrays in internal decompress functions 2017-11-11 12:54:31 +03:00
Timofey Solomko 03e6ed4256 Deal with Data object instead of bytes array in ZipContainer's getEntryData() 2017-11-11 12:49:49 +03:00
Timofey Solomko acb3d4d231 Simplify Zip's LZMA code by utilizing main LZMA decompress function 2017-11-11 12:48:08 +03:00
Timofey Solomko 2ff3b12b73 Remove converting sizes to Int in ZipContainer.getEntryData 2017-11-11 12:46:55 +03:00
Timofey Solomko 6b8c90f0bd FileSystemType properties can no longer be nil 2017-11-11 11:46:22 +03:00
Timofey Solomko 5a7b8dc812 Swiftlint autocorrect 2017-11-04 23:30:54 +03:00
Timofey Solomko 1f752affc3 ZipError.wrongCRC now includes all already processed entries 2017-11-04 22:11:55 +03:00
Timofey Solomko 9236940eac Rename ZipError.wrongCRC32 to ZipError.wrongCRC 2017-11-04 17:28:57 +03:00
Timofey Solomko f6808671a9 Add workaround for compilation problem in ZipContainer 2017-10-31 20:18:53 +03:00
Timofey Solomko c445e09c92 Rename LZMATempDecoder into LZMADecoder 2017-10-29 12:54:35 +03:00
Timofey Solomko bca275f3aa Remove label from the argument of setProperties function 2017-10-29 12:37:28 +03:00
Timofey Solomko 75ecd316a9 Use new LZMA decoder in ZIP 2017-10-29 12:08:15 +03:00
Timofey Solomko f2b03d3e42 Restore conformance to Container protocol of SevenZipContainer
Somehow I forgot to this...
2017-10-28 17:58:09 +03:00
Timofey Solomko dc6ad70168 Small updates to comments in a couple of cases 2017-10-28 17:50:00 +03:00