Commit Graph

119 Commits

Author SHA1 Message Date
Timofey Solomko 1f7a5352a7 [BZip2] Explain zero RLE in the comments 2021-01-18 16:07:44 +02:00
Timofey Solomko e83f23effa Update copyright year to 2021 2021-01-11 11:20:57 +02:00
Timofey Solomko deab72a831 Merge branch 'hotfix-4.5.7' into develop 2020-10-16 15:57:08 +03:00
Timofey Solomko 9360a8a9b8 [ZIP] Fix a crash when opening a very small file
Such files (smaller than 22 bytes) definitely don't have a EndOfCD and in this case ZipError.notFoundCentralDirectoryEnd should be properly thrown.
2020-10-15 23:35:22 +03:00
Timofey Solomko fa552e9b61 [ZIP] Fix a crash when opening a file without EndOfCD
Now ZipError.notFoundCentralDirectoryEnd is correctly thrown as was originally intended.
2020-10-14 23:51:27 +03:00
Timofey Solomko 2909f4e0c7 Merge branch 'hotfix-4.5.6' into develop 2020-09-24 23:13:26 +03:00
Timofey Solomko 2c46351a44 Fix building issue with swift 5.3 on linux 2020-09-24 13:06:54 +03:00
Timofey Solomko 761f0a0a3f Merge branch 'hotfix-4.5.5' into develop 2020-04-27 16:16:50 +03:00
Timofey Solomko 1ed0cdfdfa [ZIP] Fix a crash when encountering non well-formed Extended Timestamp
ZIP files produced by Finder on certain versions of macOS sometimes contain incorrect Extended Timestamp extra field in their Central Directory. When trying to open such files, SWCompression was crashing. This change makes SWCompression ignore "incorrectness" in Extended Timestamp.
2020-04-26 23:11:14 +03:00
Timofey Solomko 247def898b [BZip2][ZIP] Small code optimizations
A variable in BZip2 code changed to let-constant and two fields of ZIP's "end of central directory" struct are no longer properties since they aren't used anywhere.
2020-04-16 22:41:41 +03:00
Timofey Solomko a844b34436 Update copyright year to 2020 2020-03-20 09:43:42 +03:00
Timofey Solomko f6949a8f66 Replace the usage of the deprecated Data(bytes:) initializer 2020-03-20 09:40:48 +03:00
Timofey Solomko 31ec1f1553 Update copyright year to 2020 2020-01-01 19:06:33 +03:00
Timofey Solomko 75b21ae107 Replace usage of ByteReader with LittleEndianByteReader 2019-05-01 19:34:30 +03:00
Timofey Solomko db82490ed8 Replace the usage of the deprecated Data(bytes:) initializer 2019-05-01 19:30:48 +03:00
Timofey Solomko c93a783d21 [docs] Fix grammar issues with regards to a/the/null articles, while/during, and extra commas 2019-03-13 12:27:08 +03:00
Timofey Solomko ce47019097 Update copyright year to 2019 2019-01-02 23:15:43 +03:00
Timofey Solomko 12d8836529 [ZIP] Use the new ZipEntryInfoHelper and remove its properties from ZipEntryInfo 2019-01-01 13:28:50 +03:00
Timofey Solomko 2273c1e12c [ZIP] Add a new struct, ZipEntryInfoHelper, which is supposed to store additional information to _help_ ZipContainer get entry's data 2019-01-01 13:27:46 +03:00
Timofey Solomko 59d31fdb5a Swiftlinted for 4.5.0 2018-09-06 20:11:18 +03:00
Timofey Solomko f5d8d9e81e [LZMA] Add LZMAProperties initializer which reads lzma encoded properties from bytereader 2018-08-28 11:36:34 +03:00
Timofey Solomko 9a79aa8e51 [LZMA][ZIP] Add public function with data as first argument and internal function with byteReader instead which also accept LZMA properties and uncompressed size as
arguments; replace old internal decompress function used by ZIP with a new, more general one
2018-08-28 11:35:56 +03:00
Timofey Solomko c9115f367b [ZIP] Replace stored local header and cd entry in ZipEntryInfo with separate actually required properties 2018-08-13 11:38:42 +03:00
Timofey Solomko ffd47c3528 [ZIP] Set ZipEntryInfo.crc properly depending on the presence of data descriptor 2018-08-13 11:37:44 +03:00
Timofey Solomko 65fdc944bf [ZIP] Remove useless code comments 2018-08-12 20:59:57 +03:00
Timofey Solomko f0308c1ed8 [ZIP] Add public crc32 property to EntryInfo 2018-08-12 20:59:08 +03:00
Timofey Solomko 1264a194c2 [docs] Refer to "standard" extra fields as "built-in" 2018-08-12 20:52:44 +03:00
Timofey Solomko 05054ba26d [ZIP] Rename ByteReader+ZipString file to ByteReader+Zip
This is also consistent with tar extensions to ByteReader.
2018-08-12 19:31:47 +03:00
Timofey Solomko 113dcea56c [ZIP] Rename ByteReader.getZipStringField to zipString
This is consistent with tar extensions to ByteReader
2018-08-12 19:30:34 +03:00
Timofey Solomko 3ed501cdfd [ZIP] Replace ZipString class with fileprivate extensions to String and Data 2018-08-12 19:28:45 +03:00
Timofey Solomko e467370de7 [LZMA] Remove second label from internal LZMA.decompress function and simplify uncompSize processing 2018-05-20 12:26:25 +03:00
Timofey Solomko 41ca39d1fa Remove certain TODOs 2018-04-10 23:26:35 +03:00
Timofey Solomko a0ef7a3cfe Swiftlinted 2018-04-10 23:22:31 +03:00
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