MCPcopy Create free account
hub / github.com/bamler-lab/constriction / seek

Method seek

src/pybindings/stream/queue.rs:481–488  ·  view source on GitHub ↗
(&mut self, position: usize, state: (u64, u64))

Source from the content-addressed store, hash-verified

479 /// ```
480 #[pyo3(signature = (position, state))]
481 pub fn seek(&mut self, position: usize, state: (u64, u64)) -> PyResult<()> {
482 let (lower, range) = state;
483 let state = RangeCoderState::new(lower, range)
484 .map_err(|()| pyo3::exceptions::PyValueError::new_err("Invalid coder state."))?;
485 self.inner.seek((position, state)).map_err(|()| {
486 pyo3::exceptions::PyValueError::new_err("Tried to seek past end of stream.")
487 })
488 }
489
490 /// Returns `True` if all compressed data *may* have already been decoded and `False` if there
491 /// is definitely still some more data available to decode.

Callers 4

test_range_coding_seekFunction · 0.95
test_range_coding_seekFunction · 0.95
test_range_coding_seekFunction · 0.95
test_range_coding_seekFunction · 0.95

Calls

no outgoing calls

Tested by 4

test_range_coding_seekFunction · 0.76
test_range_coding_seekFunction · 0.76
test_range_coding_seekFunction · 0.76
test_range_coding_seekFunction · 0.76