mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 11:35:45 +00:00
commit
fe6fa928f9
36
Cargo.lock
generated
36
Cargo.lock
generated
@ -624,6 +624,15 @@ version = "0.4.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
|
||||
|
||||
[[package]]
|
||||
name = "lz4_flex"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ad6f50e0fd4351da4b429de1234c28feda97aafa5748fbd4a74634f5cc5d82dd"
|
||||
dependencies = [
|
||||
"twox-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lzma-sys"
|
||||
version = "0.1.20"
|
||||
@ -635,15 +644,6 @@ dependencies = [
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lzzzz"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8014d1362004776e6a91e4c15a3aa7830d1b6650a075b51a9969ebb6d6af13bc"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.6.1"
|
||||
@ -723,7 +723,7 @@ dependencies = [
|
||||
"is_executable",
|
||||
"libc",
|
||||
"linked-hash-map",
|
||||
"lzzzz",
|
||||
"lz4_flex",
|
||||
"once_cell",
|
||||
"parse-display",
|
||||
"proptest",
|
||||
@ -1043,6 +1043,12 @@ dependencies = [
|
||||
"lock_api",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.10.0"
|
||||
@ -1172,6 +1178,16 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
|
||||
|
||||
[[package]]
|
||||
name = "twox-hash"
|
||||
version = "1.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ubyte"
|
||||
version = "0.10.3"
|
||||
|
@ -22,7 +22,7 @@ gzp = { version = "0.11.3", default-features = false, features = ["snappy_defaul
|
||||
ignore = "0.4.20"
|
||||
libc = "0.2.147"
|
||||
linked-hash-map = "0.5.6"
|
||||
lzzzz = "1.0.4"
|
||||
lz4_flex = "0.11.0"
|
||||
once_cell = "1.18.0"
|
||||
rayon = "1.7.0"
|
||||
same-file = "1.0.6"
|
||||
|
@ -55,12 +55,7 @@ pub fn compress_files(
|
||||
encoder,
|
||||
level.map_or_else(Default::default, |l| bzip2::Compression::new((l as u32).clamp(1, 9))),
|
||||
)),
|
||||
Lz4 => Box::new(lzzzz::lz4f::WriteCompressor::new(
|
||||
encoder,
|
||||
lzzzz::lz4f::PreferencesBuilder::new()
|
||||
.compression_level(level.map_or(1, |l| (l as i32).clamp(1, lzzzz::lz4f::CLEVEL_MAX)))
|
||||
.build(),
|
||||
)?),
|
||||
Lz4 => Box::new(lz4_flex::frame::FrameEncoder::new(encoder).auto_finish()),
|
||||
Lzma => Box::new(xz2::write::XzEncoder::new(
|
||||
encoder,
|
||||
level.map_or(6, |l| (l as u32).clamp(0, 9)),
|
||||
|
@ -82,7 +82,7 @@ pub fn decompress_file(
|
||||
let decoder: Box<dyn Read> = match format {
|
||||
Gzip => Box::new(flate2::read::GzDecoder::new(decoder)),
|
||||
Bzip => Box::new(bzip2::read::BzDecoder::new(decoder)),
|
||||
Lz4 => Box::new(lzzzz::lz4f::ReadDecompressor::new(decoder)?),
|
||||
Lz4 => Box::new(lz4_flex::frame::FrameDecoder::new(decoder)),
|
||||
Lzma => Box::new(xz2::read::XzDecoder::new(decoder)),
|
||||
Snappy => Box::new(snap::read::FrameDecoder::new(decoder)),
|
||||
Zstd => Box::new(zstd::stream::Decoder::new(decoder)?),
|
||||
|
@ -48,7 +48,7 @@ pub fn list_archive_contents(
|
||||
let decoder: Box<dyn Read + Send> = match format {
|
||||
Gzip => Box::new(flate2::read::GzDecoder::new(decoder)),
|
||||
Bzip => Box::new(bzip2::read::BzDecoder::new(decoder)),
|
||||
Lz4 => Box::new(lzzzz::lz4f::ReadDecompressor::new(decoder)?),
|
||||
Lz4 => Box::new(lz4_flex::frame::FrameDecoder::new(decoder)),
|
||||
Lzma => Box::new(xz2::read::XzDecoder::new(decoder)),
|
||||
Snappy => Box::new(snap::read::FrameDecoder::new(decoder)),
|
||||
Zstd => Box::new(zstd::stream::Decoder::new(decoder)?),
|
||||
|
@ -164,14 +164,6 @@ impl From<std::io::Error> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<lzzzz::lz4f::Error> for Error {
|
||||
fn from(err: lzzzz::lz4f::Error) -> Self {
|
||||
Self::Lz4Error {
|
||||
reason: err.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<zip::result::ZipError> for Error {
|
||||
fn from(err: zip::result::ZipError) -> Self {
|
||||
use zip::result::ZipError;
|
||||
|
Loading…
x
Reference in New Issue
Block a user