Timofey Solomko
|
59cdfa3a19
|
out array now has proper doc string.
|
2016-12-15 23:37:36 +03:00 |
|
Timofey Solomko
|
443dcbe076
|
Rephrased docs for DeflateError.UnknownBlockType.
|
2016-12-15 23:25:08 +03:00 |
|
Timofey Solomko
|
66a4632dd0
|
findNextSymbol no longer returns optional.
|
2016-12-11 14:00:06 +03:00 |
|
Timofey Solomko
|
effb1e8691
|
Uncompressed block now added to out a little bit more efficient.
|
2016-12-09 11:29:36 +03:00 |
|
Timofey Solomko
|
1f95237274
|
Adopted removal of alignedBytes() in other code.
|
2016-12-09 01:08:49 +03:00 |
|
Timofey Solomko
|
4db6e7ec44
|
Removed remains of huffmantable.
|
2016-12-05 19:47:25 +03:00 |
|
Timofey Solomko
|
c4f54e8198
|
United two cycles through lengths array. Thus, there is no need for symbol property in HuffmanLength. Also added dots to the end of comments.
|
2016-12-04 22:25:19 +03:00 |
|
Timofey Solomko
|
6215d68aa5
|
tree property of HuffmanTree now stores only codes. findNextSymbol now returns Int instead of HuffmanLengths.
|
2016-12-04 19:58:41 +03:00 |
|
Timofey Solomko
|
875a015043
|
HuffmanTable renamed to HuffmanTree. Its properties are now private.
|
2016-12-04 19:49:53 +03:00 |
|
Timofey Solomko
|
e93050260d
|
Additionally simplified usage of findNextSymbol.
|
2016-12-04 19:28:57 +03:00 |
|
Timofey Solomko
|
91016942f0
|
Made changes so bzip2 now also works.
|
2016-12-04 19:25:28 +03:00 |
|
Timofey Solomko
|
870a4ddecf
|
Simplified findNextSymbol usage and added a new way of finding a symbol (with tree) for .reversed bitOrders.
|
2016-12-04 15:55:34 +03:00 |
|
Timofey Solomko
|
ce2039b4c1
|
Another attempt of tree creation. Note that first leafs in a tree a nils.
|
2016-12-04 13:29:36 +03:00 |
|
Timofey Solomko
|
32721b1413
|
The real job is now done only with data with pointer objects so there is no need for startPoint property of serviceInfos.
|
2016-11-26 15:40:40 +03:00 |
|
Timofey Solomko
|
234c58ace5
|
Added new way to read bytes and used it in deflate uncompressed blocks.
|
2016-11-21 20:17:27 +03:00 |
|
Timofey Solomko
|
8ee82ae51d
|
Increased performance of deflate when compressed file had a lot of repeated bytes.
|
2016-11-19 18:29:42 +03:00 |
|
Timofey Solomko
|
05ddfa50b8
|
Added more extension functions for integer type conversions.
|
2016-11-19 13:47:02 +03:00 |
|
Timofey Solomko
|
acbaf3300d
|
During decoding only uint8 arrays are now used for storing intermediate results (no Data — no memory problems).
|
2016-11-16 20:12:37 +03:00 |
|
Timofey Solomko
|
c158f895bf
|
Added new enum for specifying bit order. United DataWithPointer and DataWithStraightPointer.
|
2016-11-15 22:32:36 +03:00 |
|
Timofey Solomko
|
55b0243c46
|
Added new convenience function to DataWithPointer which returns int number directly without conversion of uint8 array.
|
2016-11-13 19:30:36 +03:00 |
|
Timofey Solomko
|
480e7dfebc
|
Comment change in deflate.
|
2016-11-12 19:16:49 +03:00 |
|
Timofey Solomko
|
cfcc869d87
|
Added a lot of comments.
|
2016-11-12 12:33:02 +03:00 |
|
Timofey Solomko
|
74fb8ca9ad
|
Usage reversedUInt8 convert functions replaced with straight counterparts because now we get bits in reversed order.
|
2016-11-05 12:02:28 +03:00 |
|
Timofey Solomko
|
5a93e76b4a
|
Deflate is rewritten with the use of DataWithPointer and new findNextSymbol function.
|
2016-11-05 00:29:46 +03:00 |
|
Timofey Solomko
|
9e88447bb6
|
ExtraLength and extraDistance calculations are now done inside decompress function.
|
2016-11-01 23:49:26 +03:00 |
|
Timofey Solomko
|
e32403ee8a
|
In Deflate.decompress Data object is used now instead of string for storing results.
|
2016-10-31 19:18:26 +03:00 |
|
Timofey Solomko
|
5296e281e4
|
Sometimes two bytes are not enough for finding next symbol.
|
2016-10-31 00:43:12 +03:00 |
|
Timofey Solomko
|
4cef5d9c58
|
Since shift+extraDistance could be greater than 16, it could cause errors. This was fixed.
|
2016-10-31 00:02:20 +03:00 |
|
Timofey Solomko
|
3fc9620276
|
Fixed incorrect calculation of mainLiterals table in case of dynamic Huffman coding.
|
2016-10-31 00:01:29 +03:00 |
|
Timofey Solomko
|
df2399ff07
|
Added documentation comments.
|
2016-10-30 16:29:42 +03:00 |
|
Timofey Solomko
|
d0a887ea87
|
convertToInt/convertToUInt8 functions' argument renamed to reversedUint8Array.
|
2016-10-30 14:45:12 +03:00 |
|
Timofey Solomko
|
641c0bb13b
|
Fixed copyright notice.
|
2016-10-29 22:32:01 +03:00 |
|
Timofey Solomko
|
9c4592bba1
|
Gzip related code moved into separate file; added two protocols; extended serviceInfo structure.
|
2016-10-29 22:27:11 +03:00 |
|
Timofey Solomko
|
1e01531e61
|
Swiftlinted.
|
2016-10-29 21:24:40 +03:00 |
|
Timofey Solomko
|
3ac1a20c6e
|
Fixed a few swift warnings.
|
2016-10-29 21:17:20 +03:00 |
|
Timofey Solomko
|
a2540d398c
|
bits function of Data extension now checks if start is the same as the end.
|
2016-10-29 17:55:47 +03:00 |
|
Timofey Solomko
|
dc6dffbb77
|
Fixed a problem with repeated strings in data.
|
2016-10-29 17:46:46 +03:00 |
|
Timofey Solomko
|
5f9c0cefcc
|
findNextSymbol now returns shift and this calculation is now correct and used everywhere.
|
2016-10-28 21:04:16 +03:00 |
|
Timofey Solomko
|
712f7ace93
|
Apparently, I've missed extraDistanceBits array and was reading a value from wrong array. This was fixed.
|
2016-10-28 21:02:31 +03:00 |
|
Timofey Solomko
|
41052737e4
|
Completed implementation of Deflate.
|
2016-10-28 20:00:34 +03:00 |
|
Timofey Solomko
|
e93ec4058b
|
Implemented dynamic coding.
|
2016-10-27 19:35:48 +03:00 |
|
Timofey Solomko
|
bca59021a5
|
Added extensions, findNextSymbol; HuffmanLength moved to a separate file.
|
2016-10-26 21:03:19 +03:00 |
|
Timofey Solomko
|
15dbb1fb60
|
Data type actually has built-in subscripts, so home-made subscripts were replaced by them.
|
2016-10-25 23:25:35 +03:00 |
|
Timofey Solomko
|
33f8466dd7
|
Cleanuped code.
|
2016-10-25 23:07:13 +03:00 |
|
Timofey Solomko
|
b000b7952b
|
Added a lot of comments and rewrote some bad code.
|
2016-10-24 23:22:36 +03:00 |
|
Timofey Solomko
|
886fd09b71
|
Added code for processing static Huffman block.
|
2016-10-24 21:31:12 +03:00 |
|
Timofey Solomko
|
720cb6d5d8
|
Fixed problem with recognizing block type.
|
2016-10-24 21:30:51 +03:00 |
|
Timofey Solomko
|
6302e3627b
|
Actually, if you read specifications carefully you will find out that the remaining bits should be dropped.
|
2016-10-24 20:31:18 +03:00 |
|
Timofey Solomko
|
aff828f4cb
|
Now while-loop actually breaks.
|
2016-10-24 20:23:50 +03:00 |
|
Timofey Solomko
|
ed5cf0ebe1
|
Moved UInt8 and Data extensions to a combined file. Added function to "combine" two bytes into one.
|
2016-10-24 20:23:26 +03:00 |
|