Skip to content

Commit

Permalink
use more bits for q5 buckets if the size is larger than a meg
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrh committed Dec 6, 2018
1 parent f9923ec commit b124a54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "brotli"
version = "3.1.4"
version = "3.1.5"
authors = ["Daniel Reiter Horn <danielrh@dropbox.com>", "The Brotli Authors"]
description = "A brotli compressor and decompressor that with an interface avoiding the rust stdlib. This makes it suitable for embedded devices and kernels. It is designed with a pluggable allocator so that the standard lib's allocator may be employed. The default build also includes a stdlib allocator and stream interface. Disable this with --features=no-stdlib. All included code is safe."
license = "BSD-3-Clause/MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/enc/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ fn ChooseHasher(params: &mut BrotliEncoderParams) {
} else {
(*hparams).type_ = 5i32;
(*hparams).block_bits = core::cmp::min((*params).quality - 1, 9);
(*hparams).bucket_bits = if (*params).quality < 7 {
(*hparams).bucket_bits = if (*params).quality < 7 && (*params).size_hint <= (1usize << 20i32) {
14i32
} else {
15i32
Expand Down

0 comments on commit b124a54

Please sign in to comment.