Skip to content

Commit 8132bc7

Browse files
committed
feat(lzma): implement reading uncompressed size
1 parent eaf199e commit 8132bc7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/compression-codecs/src/lzma/decoder.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{Decode, Xz2Decoder};
1+
use crate::{Decode, DecodedSize, Xz2Decoder};
22
use compression_core::util::PartialBuffer;
33
use std::{convert::TryInto, io::Result};
44

@@ -61,3 +61,9 @@ impl Decode for LzmaDecoder {
6161
self.inner.finish(output)
6262
}
6363
}
64+
65+
impl DecodedSize for LzmaDecoder {
66+
fn decoded_size(input: &[u8]) -> io::Result<usize> {
67+
Xz2Decoder::decoded_size(input)
68+
}
69+
}

0 commit comments

Comments
 (0)