Commit Graph
2292 Commits
Author SHA1 Message Date
Timofey Solomko f9f5e9e613 Prepare for the test release of 4.8.0 4.8.0-test 2022-01-20 22:20:04 +03:00
Timofey Solomko 939f08abad [Tests] Add a test for BZip2 truncated in the middle of a Huffman symbol 2022-01-20 22:09:55 +03:00
Timofey Solomko f539a53386 [Huffman] Ensure that there is data available in findNextSymbol()
This fixes potential crashes in BZip2 and Deflate when processing truncated data (a corresponding symbolNotFound error will be thrown instead). There is a performance penalty to this fix, though.
2022-01-20 22:07:43 +03:00
Timofey Solomko 0c5cd4a9b5 [BZip2] Rework a part of BZip2.decompress for clarity 2022-01-15 20:21:26 +03:00
Timofey Solomko 3ab61e88bb [swcomp] Adjust requirements for compression ratio computation
The type of the input is no longer checked (since it is no longer need due to the addition of benchmarkInputSize); it is now correctly checked that the size of the output, not input, is non-zero.
2022-01-13 22:45:03 +03:00
Timofey Solomko 8aa671a4e0 [swcomp] The result of BenchmarkCommand.benchmark is now discardable 2022-01-13 22:43:14 +03:00
Timofey Solomko e3ada549fd [swcomp] Replace custom SpeedFormat with Foundation's ByteCountFormatter 2022-01-11 22:35:22 +03:00
Timofey Solomko 2a60991067 [swcomp] Make BenchmarkCommand significantly more customizable + add ReaderTar benchmark 2022-01-11 22:16:07 +03:00
Timofey Solomko 1000194a7e [swcomp] Make all classes final 2022-01-09 14:44:40 +03:00
Timofey Solomko 9241987e53 [swcomp] Add writer-tar benchmark
In addition move create-tar benchmark into BenchmarkGroup.swift file
2022-01-09 14:36:24 +03:00
Timofey Solomko 3caacff134 [swcomp] Add FileHandle closeCompat() extension
This is the same one used in tests.
2022-01-09 14:33:22 +03:00
Timofey Solomko 3388cb047b [TAR] Rename the second argument of TarWriter.init to force
This is for consistency with TarContainer.create.
2022-01-09 14:17:00 +03:00
Timofey Solomko 3508148fd7 [Tests] Add tests for TarWriter 2022-01-09 14:08:53 +03:00
Timofey Solomko cc408864f8 [Tests] Add many tests for TarReader 2022-01-08 23:26:55 +03:00
Timofey Solomko c8d8c7b4fd [TAR] TarReader.read now throws DataError.truncated if the entry data is truncated 2022-01-08 23:13:46 +03:00
Timofey Solomko a3677a0cb7 [TAR] TarReader now sets TarEntry.data to nil for directories
This is the same behavior as TarContainer.open.
2022-01-08 23:00:21 +03:00
Timofey Solomko 8abe3b1077 [Tests] Close FileHandle properly in TAR tests 2022-01-08 16:15:41 +03:00
Timofey Solomko 79a0aa8d08 Fix compilation issues on Linux and Windows due to the absence of autoreleasepool 2022-01-08 15:47:16 +03:00
Timofey Solomko c4aab7b648 [swcomp] Remove --use-rw-api option from tar command
Swcomp now uses TarReader/Writer automatically, if possible (when there is no compression involved).
2022-01-08 15:38:58 +03:00
Timofey Solomko 79295db930 Update copyright year to 2022 2022-01-08 15:02:59 +03:00
Timofey Solomko 95d02c46a4 Upgrade xcode project and update swift in CI to 5.5.2 2022-01-08 14:55:47 +03:00
Timofey Solomko 245f043025 [Tests] Move TarReader/Writer tests into their own files 2022-01-08 14:43:44 +03:00
Timofey Solomko a898c9aabe [swcomp] Use autoreleasepool for tar creating in rw-api version 2022-01-08 14:35:09 +03:00
Timofey Solomko 4c282c6fae [swcomp] Fix incorrect tar info printing when using TarReader 2022-01-08 14:34:34 +03:00
Timofey Solomko de9cf3916c [swcomp] Rewrite tar command info and extract rw-api versions using TarReader.process 2022-01-08 14:33:50 +03:00
Timofey Solomko ddb789b645 [TAR] Add TarReader.process(_:) 2022-01-08 14:33:50 +03:00
Timofey Solomko fe9453173a [TAR] Rename TarReader.next() to read() 2022-01-08 14:33:40 +03:00
Timofey Solomko b76b1f0ea5 Merge branch 'philmitchell-tar-rw' into tar-rw 2022-01-07 14:39:30 +03:00
Phil Mitchell c5bbc713b3 [swcomp] Use autoreleasepool to immediately free memory when untarring file with rw-api 2022-01-02 11:13:17 -08:00
Timofey Solomko 0a5378a016 [swcomp] Add a second version of TarCommand.execute for use-rw-api option
It doesn't support any of the compression options, as well as format option.
2021-11-21 12:37:36 +03:00
Timofey Solomko 643f2c9866 [TAR] Remove argument label from TarWriter.append 2021-11-21 12:36:56 +03:00
Timofey Solomko eaa0ae4b9b [swcomp] Add TarEntry.generateEntries function which uses TarWriter 2021-11-21 12:36:16 +03:00
Timofey Solomko 7733b293d3 [swcomp] Restructure writeEntries into writeFile and writeDirectory 2021-11-21 12:28:38 +03:00
Timofey Solomko c5efb9bf39 [swcomp] Clarify a couple of error messages 2021-11-21 11:56:07 +03:00
Timofey Solomko 44a0cc637d [Tests] Add a simple test for TarWriter 2021-11-20 23:45:27 +03:00
Timofey Solomko 4545d6b1f0 [TAR] Add TarWriter 2021-11-20 23:45:05 +03:00
Timofey Solomko 6306365cde [swcomp] Add use-rw-api option to tar command
It enables usage of new TarReader/Writer APIs. For now only info option supports this.
2021-11-20 21:33:05 +03:00
Timofey Solomko 7c1a12bb0d [TAR] Initialize optional vars explicitly in TarParser and TarReader 2021-11-20 21:32:29 +03:00
Timofey Solomko 44ff3de44f [TAR] Add conditional compilation for FileHandle to fix issues with Swift 5.1 2021-11-20 17:51:34 +03:00
Timofey Solomko 49becf4a9f [TAR] Remove getChunk and add getOffset and set(offset:) 2021-11-20 17:48:04 +03:00
Timofey Solomko 2ca4bcf3af [Tests] Add a simple test for TarReader 2021-11-20 12:29:05 +03:00
Timofey Solomko 993c36c509 [Tests] Add a function which returns a file handle to the test file 2021-11-20 12:28:52 +03:00
Timofey Solomko 61eac884da [TAR] Add TarReader 2021-11-20 12:28:33 +03:00
Timofey Solomko c708f5c248 Merge branch 'release-4.7.0' into develop 2021-11-04 12:13:02 +03:00
Timofey Solomko 1e8ad0e2a5 Prepare for 4.7.0 release 2021-11-04 12:12:10 +03:00
Timofey Solomko 6971656b63 Two minor changes: make Checksums a caseless enum, fix a grammar mistake in a code comment 2021-11-04 12:10:39 +03:00
Timofey Solomko df9c3fc0e2 Update README for 4.7.0
This includes adding LZ4 to the table of supported algorithms, mentioning LZ4 in the cocoapods section, and changing mentions of 4.6.0 to 4.7.0.
2021-11-03 20:45:10 +03:00
Timofey Solomko fbff12c435 [docs] Add new types to jazzy categories 2021-11-03 20:44:26 +03:00
Timofey Solomko 10905dc588 [docs] Minor fixes to LZ4 documentation 2021-11-03 20:41:48 +03:00
Timofey Solomko 9f7efc9276 [docs] Add documentation for LZ4 compression functions 2021-11-03 20:31:08 +03:00