Releases: tsolomko/SWCompression
2.2.0 (Deflate compression)
- Implementation of Deflate compression algorithm
Comment: This first implementation is somewhat limited. Firstly, only one block is created and this block is either uncompressed data or compressed with static Huffman coding. Secondly, uncompressed block is only created if amount of input data is less than 3 bytes. Thus, the current implementation doesn't provide best compression ratio (dynamic Huffman encoding is necessary). Moreover, there are some performance problems, but they hopefully will be eliminated in future versions, as well as implementation's limitations. - Added ability to create an instance of
ZipContainer
class.
Comment: During initialisation only central directory of ZIP archive is parsed. Data for entries found in central directory can be retrieved through the newZipContainer
instance method. - Added new structure:
ZipEntry
.
Comment:ZipContainer
object can provide data from ZIP archive associated with zip entry.
2.2.0 Test
This update will provide support for (limited) Deflate compression as well as some additions to API which will simplify processing of ZIP archives.
2.1.0 (ZIP support)
- Added function which opens ZIP containers (archives).
Comment: Currently, support of ZIP files is somewhat limited. First of all, it is limited only to files complying to ISO/IEC 21320-1 standard. Secondly, it reads all entries from ZIP file at once and doesn't determine if entry is a directory. For more information about current limitations see open
function documentation page. Also, more sophisticated API for ZIP containers processing will be added in the future.
HuffmanTree
is no longer part of SWCompression/Common.
Comment: Instead, it is now a part of sub-podspecs which really need it (SWCompression/Deflate and SWCompression/BZip2). It should slightly reduce compile time and size for some configurations.
- Updated documentation.
Comment: Apart from minor fixes in documentation, documentation for 2.0.1 version wasn't referencing corresponding source code and that is fixed now.
2.1.0 Test 2
Added support for data descriptor in zip files, also HuffmanTree is no longer part of SWComrpession/Common subpodspec.
2.1.0 Test
This upcoming release will contain support for opening ZIP archives.
2.0.1
- Fixed incorrect reading of adler32 checksum from zlib archives.
- Removed LZMA_INFO and LZMA_DIAG build options.
There were also two things in previous version (2.0.0) that I forgot to mention:
- GZip archives with multiple 'members' are now parsed correctly.
- I have published swcomp — a small command-line app which uses SWCompression to unpack archives and serves as an example of SWCompression's capabilities.
2.0 (LZMA, XZ, Speed)
- Support for LZMA/LZMA2 decompression.
- Support for unarchiving XZ archives.
- Significant performance improvement (this time for real).
Story time: It seems like that Swift'sArray.append(contentsOf:)
function is ridiculously slow. When I replaced the majority of this function's calls with adding elements one by one, the speed of Deflate decompression became incredible (compared to what was before). If you look at the tests results in 'Tests/Results' directory you will understand about which difference I am talking. However, it is possible, that real reasons are different, but results are still impressive. - Now GZip and Zlib functions (as well as newly added XZ ones) calculate checksum for unarchived data.
Comment: Calculated checksum is compared then with the one stored in archive. If they don't coincide the new error is thrown. However, since it can happen at the end of decompression and it is very sad to throw out the result at this point, the unarchived data is returned as associated value of this new error. - Added functions for reading service information from GZip and Zlib archives.
Comment: This functions (and structs in which they are located) existed before, but were purely internal. Now they are in public API and more suitable for usage. - Documentation (list of public API functions with comments, etc.) is now hosted on Github pages and you can check it out here.
DeflateError
now has a couple of more specific cases instead ofHuffmanTableError
.- Some comments to public API have been rephrased.
- Added missing comment to
BZip2Error.WrongMagic
. - Two build options have been added: LZMA_DIAG and LZMA_INFO.
Comment: this options make SWCompression to print messages when LZMA decompression is happening and in case of LZMA_DIAG there are a lot of messages. These options exist only for diagnostic and debugging purposes and are very likely to be removed in future versions.
One more thing. I have messed up with repository a little bit in attempt to remove lfs-tracked files from history when they weren't lfs-tracked. I was hoping to reduce the amount of downloaded data during git clone
because it seems that git was still downloading them despite them being in lfs now. My actions resulted in doubling the amount of commits in repository. It is bad, but it shouldn't hurt anyone very much. I've learned my lesson and never going to do this once again.
2.0 Test 2
This test version includes fixes for several build errors which occur when compiling with Carthage or Cocoapods.
2.0 Test
This is going to be a really big update: LZMA/LZMA2, XZ, some other stuff, and, of course, performance.
Talking about performance: this time it is a real improvement. Look at the tests' results!
One more thing: at one point at the development I've tried to remove Git-LFS-tracked files from Git history when they weren't in lfs. These operations resulted in doubling all the commits in repository. Certainly, I am not going to do something like this again.