Commit Graph

85 Commits

Author SHA1 Message Date
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 e83f23effa Update copyright year to 2021 2021-01-11 11:20:57 +02:00
Timofey Solomko 31ec1f1553 Update copyright year to 2020 2020-01-01 19:06:33 +03:00
Timofey Solomko 04b87f9e95 Mark @inline(__always) functions as @inlinable 2019-05-01 19:36:51 +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 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 5e51968ca6 Add a func which generates Huffman codes based on their lengths 2019-03-12 22:31:02 +03:00
Timofey Solomko 6889f58461 Add new initiliaziers to huffman trees which init from codes instead of lengths 2019-03-12 22:30:50 +03:00
Timofey Solomko 7ae5cfa1a2 Add a new struct which represents an abstract code from coding tree 2019-03-12 22:30:35 +03:00
Timofey Solomko 9f138f86a6 Move Huffman tree related code into the CodingTree sub-group/directory 2019-03-12 22:30:21 +03:00
Timofey Solomko 1df768c09f Move the lengths bootstrapping function into the namespace of the CodeLength 2019-03-12 22:29:53 +03:00
Timofey Solomko 7f25dbf6e7 Rename HuffmanLength to CodeLength 2019-03-12 22:28:01 +03:00
Timofey Solomko 08bea5ad53 Make Huffman tree classes final 2019-01-04 20:22:09 +03:00
Timofey Solomko ce47019097 Update copyright year to 2019 2019-01-02 23:15:43 +03:00
Timofey Solomko 8457f85c75 Add implementation for decoding Delta filter 2018-08-29 10:30:05 +03:00
Timofey Solomko 3790b3acac [docs] Clarify in docs for ContainerEntry.data that data is assumed to be uncompressed 2018-08-07 21:05:36 +03:00
Timofey Solomko 3d3d4a2c0e Move Comparable extension of HuffmanLength into its main file 2018-04-13 22:56:15 +03:00
Timofey Solomko 7929e58022 Synthesize Equatable conformance for HuffmanLength 2018-04-13 22:55:12 +03:00
Timofey Solomko 05268bd44e [docs] Add "missing" docs for Container.Entry and and ContainerEntry.Info
Apparently, something changed in Swift 4.1 and sourcekitten/jazzy now detects associated types and produces documentation for them.
2018-04-13 18:53:58 +03:00
Timofey Solomko 9293210d35 All properties in huffman trees are now constant 2018-03-31 13:50:50 +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 a34e272f97 [docs] Fix typo in Container protocol 2018-03-17 15:38:46 +03:00
Timofey Solomko b9f325f91b Small text/comments-related changes 2018-02-07 23:59:42 +03:00
Timofey Solomko 32d3cc6279 Extract ntfs timestamps reference date as static property 2018-01-28 19:17:52 +03:00
Timofey Solomko 8fa195d560 [TAR] Replace Int.roundTo512() function with bitwise inlinable version in common Extensions file 2018-01-17 12:12:29 +03:00
Timofey Solomko 536b5dcb49 Extract reverse local function of HuffmanTrees' inits as Int extension 2018-01-07 15:12:59 +03:00
Timofey Solomko e714dc308b Updated copyright year to 2018 2018-01-03 19:44:18 +03:00
Timofey Solomko d2d74d52b9 Remove unused extensions 2018-01-03 19:22:15 +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 1293cf15a0 Make BitReader.bitMask completely private 2018-01-03 19:22:14 +03:00
Timofey Solomko 22bd529b3c Change return type of BitReader.bit() to UInt8 2018-01-03 19:22:13 +03:00
Timofey Solomko dcf18c73d6 Rename ByteReader.isAtTheEnd to isFinished 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 b9eeb1bc7c Rename ByteReader.index to offset 2018-01-03 19:22:13 +03:00
Timofey Solomko 3751e25c4f Rename DataWithPointer to ByteReader
This and following commits should ease switch to BitByteData usage.
2018-01-03 19:22:13 +03:00
Timofey Solomko e05f917210 Improve compile time 2017-12-24 14:57:35 +03:00
Timofey Solomko cce4d35ab7 Remove bitOrder argument from BitWriter.write(number:bitCount:) 2017-12-21 15:26:00 +03:00
Timofey Solomko d63d2977fb Only reverse bit order of codes in EncHuffmanTree if necessary
And it is necessary only for Deflate. This will allow us to remove bitOrder argument of BitWriter.write, which has very unclear semantics
2017-12-21 15:24:54 +03:00
Timofey Solomko 07d9d41db2 Remove BitReader and DWP initialisers from byte array 2017-12-05 22:21:52 +03:00
Timofey Solomko cd9bd4eec4 Remove DWP.previousByte 2017-12-05 22:21:32 +03:00
Timofey Solomko 3b0e3c5d74 Mark several extension functions as inline-always 2017-11-22 22:25:18 +03:00
Timofey Solomko d9954f4791 Use new toArray function in DWP.bytes 2017-11-22 22:24:45 +03:00
Timofey Solomko 1fa558f1a6 Add toArray extension function with count argument 2017-11-22 22:24:26 +03:00
Timofey Solomko b9cebf13e9 Remove dwp functions with count argument 2017-11-22 22:08:02 +03:00