Skip to content

Commit 130840c

Browse files
committed
Add getters to zlib.Decompressor
1 parent aafbdd0 commit 130840c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

vm/src/stdlib/zlib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,19 @@ impl PyValue for PyDecompress {
150150
}
151151
#[pyimpl]
152152
impl PyDecompress {
153+
#[pyproperty]
154+
fn eof(&self) -> bool {
155+
self.eof.load()
156+
}
157+
#[pyproperty]
158+
fn unused_data(&self) -> PyBytesRef {
159+
self.unused_data.lock().unwrap().clone()
160+
}
161+
#[pyproperty]
162+
fn unconsumed_tail(&self) -> PyBytesRef {
163+
self.unconsumed_tail.lock().unwrap().clone()
164+
}
165+
153166
fn save_unconsumed_input(
154167
&self,
155168
d: &mut Decompress,

0 commit comments

Comments
 (0)