Timofey Solomko
4ad6940f29
Merge branch 'release-4.8.0'
4.8.0
2022-01-23 18:57:24 +03:00
Timofey Solomko
86090a4b67
Prepare for 4.8.0 release
2022-01-23 18:56:51 +03:00
Timofey Solomko
f9994d6e6f
[docs] Minor change to TarWriter documentation
2022-01-23 18:56:33 +03:00
Timofey Solomko
13a7da9be0
[docs] Reorganize Containers jazzy category into separate categories
2022-01-22 16:25:01 +03:00
Timofey Solomko
1d57f6adc1
[docs] Mention obj-c exceptions and swift 5.2 issues in the docs for TarReader/Writer
2022-01-22 16:24:26 +03:00
Timofey Solomko
552cb31336
[docs] Add documentation for TarReader
2022-01-22 14:26:54 +03:00
Timofey Solomko
859178d5f2
[docs] Add documentation for TarWriter
2022-01-22 14:26:42 +03:00
Timofey Solomko
479cd580a9
[docs] Add TarReader/Writer to jazzy categories
2022-01-22 13:40:09 +03:00
Timofey Solomko
4ccb5e1de8
[docs] Small fixes to the documentation of TarContainer.create(from:force:)
2022-01-22 13:39:40 +03:00
Timofey Solomko
ba7e4448d1
[TAR] Simplify TarWriter.finalize
...
This is possible since the write function already performs the synchronization the file handle.
2022-01-22 13:38:32 +03:00
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