parent
51a88ab95b
commit
fd2c51eac4
|
@ -147,6 +147,15 @@ dependencies = [
|
|||
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fuchsia-zircon"
|
||||
version = "0.3.3"
|
||||
|
@ -684,7 +693,7 @@ dependencies = [
|
|||
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)",
|
||||
"flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -912,6 +921,7 @@ dependencies = [
|
|||
"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
|
||||
"checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180"
|
||||
"checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423"
|
||||
"checksum flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37847f133aae7acf82bb9577ccd8bda241df836787642654286e79679826a54b"
|
||||
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
||||
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
||||
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
|
||||
|
|
|
@ -16,7 +16,7 @@ byteorder = "1.2.6"
|
|||
hyper = "0.8.0"
|
||||
serde = "0.7.0"
|
||||
serde_json = "0.7.0"
|
||||
flate2 = "0.2.13"
|
||||
flate2 = "1.0.2"
|
||||
zip = "0.1.16"
|
||||
image = "0.7.0"
|
||||
rand = "0.3.14"
|
||||
|
|
|
@ -30,7 +30,7 @@ use std::io::{Write, Read};
|
|||
use std::convert;
|
||||
use byteorder::{BigEndian, WriteBytesExt, ReadBytesExt};
|
||||
use flate2::read::{ZlibDecoder, ZlibEncoder};
|
||||
use flate2;
|
||||
use flate2::Compression;
|
||||
use std::time::{Instant, Duration};
|
||||
use shared::Position;
|
||||
|
||||
|
@ -788,7 +788,7 @@ impl Conn {
|
|||
};
|
||||
if self.compression_threshold >= 0 && buf.len() as i32 > self.compression_threshold {
|
||||
if self.compression_write.is_none() {
|
||||
self.compression_write = Some(ZlibEncoder::new(io::Cursor::new(Vec::new()), flate2::Compression::Default));
|
||||
self.compression_write = Some(ZlibEncoder::new(io::Cursor::new(Vec::new()), Compression::default()));
|
||||
}
|
||||
extra = 0;
|
||||
let uncompressed_size = buf.len();
|
||||
|
|
Loading…
Reference in New Issue