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
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
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
2022-01-20 22:20:04 +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
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
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
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
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
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
61eac884da
[TAR] Add TarReader
2021-11-20 12:28:33 +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
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
Timofey Solomko
d73fc791b1
[docs] Add documentation for DataError
2021-11-03 20:19:41 +03:00
Timofey Solomko
e3ffb812b9
[docs] Add documentation for LZ4 decompression functions
2021-11-03 20:13:42 +03:00
Timofey Solomko
5d63df36cf
Prepare for the test release of 4.7.0
2021-10-30 13:06:45 +03:00
Timofey Solomko
a3332364a7
[Tests] Add many tests that check that checksum errors are thrown correctly
2021-10-29 19:26:33 +03:00
Timofey Solomko
20e8db701f
[Tests] Add a test for correct usage of CP437 in ZIP
2021-10-28 19:54:25 +03:00
Timofey Solomko
088d63ac03
[swcomp] Add --use-format option to tar command
...
This option allows to specify which TAR format to use when creating a container.
2021-10-25 20:01:00 +03:00