Skip to main content

j2k_core/
scratch.rs

1// SPDX-License-Identifier: Apache-2.0
2
3/// Caller-owned reusable scratch allocations for codec implementations.
4pub trait ScratchPool: Send {
5    /// Return the number of bytes currently retained by the pool.
6    fn bytes_allocated(&self) -> usize;
7    /// Clear reusable allocations or cached state held by the pool.
8    fn reset(&mut self);
9}