Skip to content

Commit

Permalink
Merge branch 'hotfix-2.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
tsolomko committed Feb 26, 2017
2 parents 30ccb68 + 13965d0 commit 0cf4d4f
Show file tree
Hide file tree
Showing 68 changed files with 255 additions and 247 deletions.
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ exclude: Tests/
swift_version: 3.0.2
author: Timofey Solomko
module: SWCompression
module_version: 2.2.1
module_version: 2.2.2
copyright: '© 2017 Timofey Solomko'
readme: README.md
github_url: https://github.com/tsolomko/SWCompression
github_file_prefix: https://github.com/tsolomko/SWCompression/tree/v2.2.1
github_file_prefix: https://github.com/tsolomko/SWCompression/tree/v2.2.2
theme: fullwidth
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
v2.2.2
----------------
- Fixed problem with zero-length uncompressed blocks.

v2.2.1
----------------
- Now creates uncompressed block instead of huffman if it will provide better results (in terms of "compression").
Expand Down
2 changes: 1 addition & 1 deletion SWCompression.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SWCompression"
s.version = "2.2.1"
s.version = "2.2.2"
s.summary = "Framework with implementations in Swift of different (de)compression algorithms"

s.description = <<-DESC
Expand Down
6 changes: 5 additions & 1 deletion Sources/Deflate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ public final class Deflate: DecompressionAlgorithm {
}
let staticHuffmanBlockSize = bitsCount % 8 == 0 ? bitsCount / 8 : bitsCount / 8 + 1

if uncompBlockSize <= staticHuffmanBlockSize {
// Since `length` of uncompressed block is 16-bit integer,
// there is a limitation on size of uncompressed block.
// Falling back to static Huffman encoding in case of big uncompressed block is a band-aid solution.
// TODO: Implement spliting uncompressed block into smaller blocks.
if uncompBlockSize <= staticHuffmanBlockSize && uncompBlockSize <= 65535 {
// In case if according to our calculations static huffman will only make output data then input,
// we fallback to creating uncompressed block.
// In this case dynamic Huffman encoding can be efficient.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Service/Info-iOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.1</string>
<string>2.2.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Service/Info-tvOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.1</string>
<string>2.2.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Service/Info-watchOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.1</string>
<string>2.2.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Service/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.1</string>
<string>2.2.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
Expand Down
16 changes: 8 additions & 8 deletions docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/LZMA2.swift#L38-L106">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/LZMA2.swift#L38-L106">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -221,7 +221,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/GzipArchive.swift#L180-L221">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/GzipArchive.swift#L180-L221">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -256,7 +256,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZipContainer.swift#L77-L236">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZipContainer.swift#L77-L236">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -291,7 +291,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/LZMA.swift#L44-L90">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/LZMA.swift#L44-L90">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -326,7 +326,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZlibArchive.swift#L125-L157">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZlibArchive.swift#L125-L157">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -361,7 +361,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/Deflate.swift#L32-L471">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/Deflate.swift#L32-L475">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -396,7 +396,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/BZip2.swift#L47-L277">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/BZip2.swift#L47-L277">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -431,7 +431,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/XZArchive.swift#L58-L346">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/XZArchive.swift#L58-L346">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/BZip2.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4>Return Value</h4>

</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/BZip2.swift#L61-L97">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/BZip2.swift#L61-L97">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/Classes/Deflate.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4>Return Value</h4>

</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/Deflate.swift#L46-L50">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/Deflate.swift#L46-L50">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -267,7 +267,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/Deflate.swift#L238-L290">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/Deflate.swift#L238-L294">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/GzipArchive.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ <h4>Return Value</h4>

</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/GzipArchive.swift#L198-L219">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/GzipArchive.swift#L198-L219">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/LZMA.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4>Return Value</h4>

</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/LZMA.swift#L58-L63">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/LZMA.swift#L58-L63">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/LZMA2.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4>Return Value</h4>

</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/LZMA2.swift#L52-L59">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/LZMA2.swift#L52-L59">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/XZArchive.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h4>Return Value</h4>

</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/XZArchive.swift#L76-L143">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/XZArchive.swift#L76-L143">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
8 changes: 4 additions & 4 deletions docs/Classes/ZipContainer.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZipContainer.swift#L82">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZipContainer.swift#L82">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -272,7 +272,7 @@ <h4>Parameters</h4>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZipContainer.swift#L103-L132">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZipContainer.swift#L103-L132">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -336,7 +336,7 @@ <h4>Parameters</h4>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZipContainer.swift#L145-L204">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZipContainer.swift#L145-L204">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -421,7 +421,7 @@ <h4>Return Value</h4>

</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZipContainer.swift#L227-L234">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZipContainer.swift#L227-L234">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes/ZlibArchive.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ <h4>Return Value</h4>

</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZlibArchive.swift#L143-L155">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZlibArchive.swift#L143-L155">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
16 changes: 8 additions & 8 deletions docs/Enums.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/LZMA2.swift#L21-L35">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/LZMA2.swift#L21-L35">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -242,7 +242,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/GzipArchive.swift#L24-L40">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/GzipArchive.swift#L24-L40">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -292,7 +292,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZipContainer.swift#L27-L48">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZipContainer.swift#L27-L48">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -341,7 +341,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/LZMA.swift#L26-L41">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/LZMA.swift#L26-L41">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -386,7 +386,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/ZlibArchive.swift#L22-L36">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/ZlibArchive.swift#L22-L36">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -429,7 +429,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/Deflate.swift#L20-L29">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/Deflate.swift#L20-L29">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -477,7 +477,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/BZip2.swift#L25-L44">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/BZip2.swift#L25-L44">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -528,7 +528,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.1/Sources/XZArchive.swift#L28-L55">Show on GitHub</a>
<a href="https://github.com/tsolomko/SWCompression/tree/v2.2.2/Sources/XZArchive.swift#L28-L55">Show on GitHub</a>
</div>
</section>
</div>
Expand Down
Loading

0 comments on commit 0cf4d4f

Please sign in to comment.