Timofey Solomko
8af69fb15b
Switch to the generalize-source branch of BBD
...
Additionally, adjust DecodingTree to make it work with the generalize-source branch.
2021-03-26 15:33:41 +02:00
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
00af5a9319
[BZip2][GZip][LZMA][XZ][Zlib] Fix crashes when opening very small files
...
Instead errors are now thrown.
2020-10-15 23:35:34 +03:00
Timofey Solomko
ab75e0944f
[BZip2] Fix compilation warning
2020-10-14 23:45:46 +03:00
Timofey Solomko
a844b34436
Update copyright year to 2020
2020-03-20 09:43:42 +03:00
Timofey Solomko
94ab3ba1f5
Replace usage of deprecated index(...) functions with the new ones
2020-03-20 09:41:52 +03:00
Timofey Solomko
fafb9cde87
Move public identifier from extension to enum itself (BZip2.BlockSize)
2020-03-20 09:41:38 +03:00
Timofey Solomko
f6949a8f66
Replace the usage of the deprecated Data(bytes:) initializer
2020-03-20 09:40: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
04f64bcb72
Rename Encoding/DecodingHuffmanTree to just Encoding/DecodingTree
2019-03-12 22:31:35 +03:00
Timofey Solomko
142fd44dd2
Remove old CodeLength initializer from Encoding(Huffman)Tree
2019-03-12 22:31:24 +03:00
Timofey Solomko
250c9fbd4c
Remove old CodeLength initializer from Decoding(Huffman)Tree
2019-03-12 22:31:13 +03:00
Timofey Solomko
7f25dbf6e7
Rename HuffmanLength to CodeLength
2019-03-12 22:28:01 +03:00
Timofey Solomko
c4c4063923
[docs] Small improvements to various BZip2 documentation
2019-01-04 14:59:13 +03:00
Timofey Solomko
ce47019097
Update copyright year to 2019
2019-01-02 23:15:43 +03:00
Timofey Solomko
1c5ca3bbe5
Swiflinted before 4.4.0
2018-08-07 21:18:39 +03:00
Timofey Solomko
d187bd2937
Use new uint64(fromBits) function
2018-04-10 22:37:20 +03:00
Timofey Solomko
1d838c1d7e
Slightly simplify and improve certain code
2018-04-07 13:38:00 +03:00
Timofey Solomko
cb9d181754
[BZip2] Don't create new Huffman trees if maximum amount of trees possible is already reached
2018-03-03 20:30:49 +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
ba037786b4
[LZMA] Add public decompress(from:) function which uses BBD's ByteReader as its argument
2018-02-23 12:58:24 +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
e710e37233
[BZip2] Add comments about smaller block size for compression
2018-01-29 19:55:42 +03:00
Timofey Solomko
7d99ab176a
[BZip2] Use not-reduced block size for decompression
2018-01-17 12:01:00 +03:00
Timofey Solomko
ca41cc3b5f
[BZip2] Additionally reduce block sizes by 1.25
...
This is required, because, apparently, original bzip2 implementation doesn't account for the fact that the initial RLE can cause expansion of the data.
2018-01-16 22:28:35 +03:00
Timofey Solomko
d8a47efd44
[BZip2] Slightly optimise initial RLE in compress
2018-01-14 23:07:09 +03:00
Timofey Solomko
02fb0c2886
[BZip2] Fix incorrect block sizes in compression
...
I previously thought that 1KB = 1024 bytes, but apparently in this case it is just 1000 bytes.
2018-01-14 18:17:44 +03:00
Timofey Solomko
81a6cba5ff
Swiftlinted with two new rules
2018-01-14 11:12:27 +03:00
Timofey Solomko
44f33bf02a
Make bit reader and writer functions' parameters concrete classes
...
Previously, it was almost always protocols, which in some cases didn't make sense.
2018-01-07 22:27:36 +03:00
Timofey Solomko
bb45735132
Merge BurrowsWheeler.reverse and transofrm functions
...
The latter was used only for reverse transformation despite its name.
2018-01-07 20:09:34 +03:00
Timofey Solomko
b9440aac9f
Rework inverse BWT by removing sorting stage
...
This change has a significant impact on performance in a good way.
2018-01-07 15:16:18 +03:00
Timofey Solomko
1dbc64a615
Remove switch from BZip2.BlockSize.headerByte
2018-01-07 15:12:59 +03:00
Timofey Solomko
7a09d5fde8
Preallocate bytes arrays in BZip2
2018-01-07 15:12:54 +03:00
Timofey Solomko
b035d910a0
Rewrite BZip2.BlockSize.headerByte() as computed properties
2018-01-05 15:03:47 +03:00
Timofey Solomko
9f4884adc8
Refactor bzip2 block size parsing
2018-01-03 23:41:20 +03:00
Timofey Solomko
e714dc308b
Updated copyright year to 2018
2018-01-03 19:44:18 +03:00
Timofey Solomko
c8d92e56d3
Replace BitReader and ByteReader with BitByteData's implementations
2018-01-03 19:22:15 +03:00
Timofey Solomko
bb39c4016c
Replace SWCompression.BitWriter with BitByteData's one
2018-01-03 19:22:15 +03:00
Timofey Solomko
22bd529b3c
Change return type of BitReader.bit() to UInt8
2018-01-03 19:22:13 +03:00
Timofey Solomko
cef8ab12a2
Rename BitWriter.finish() to align
2018-01-03 19:22:13 +03:00
Timofey Solomko
15c06843b1
Replace BitWriter.buffer with Data
2018-01-03 19:22:13 +03:00
Timofey Solomko
e05f917210
Improve compile time
2017-12-24 14:57:35 +03:00
Timofey Solomko
545e5c69fc
Remove some redundancy from documentation
2017-11-14 21:35:30 +03:00
Timofey Solomko
556e42e179
Add and update documentation
2017-11-14 20:37:20 +03:00
Timofey Solomko
b3ebeb20be
Rename BZip2Error.wrongHuffmanLengthCode to wrongHuffmanCodeLength
2017-11-10 22:20:47 +03:00
Timofey Solomko
9ae46fb84b
Include last processed block in wrongCRC error of BZip2
2017-11-04 21:42:53 +03:00
Timofey Solomko
0b85d8f768
Rename BZip2Error.wrongCompressionMethod into BZip2Error.wrongVersion
2017-11-04 20:22:03 +03:00
Timofey Solomko
b04cb4ceb8
Use Data instead of byte arrays in BZip2 decompression as much as possible
2017-10-31 20:18:18 +03:00
Timofey Solomko
7eacfe7ab6
Extract private functions for stages of bzip2 processing
2017-10-07 15:16:21 +03:00