Struct parquet::column::page::CompressedPage
source · pub struct CompressedPage { /* private fields */ }
Expand description
Helper struct to represent pages with potentially compressed buffer (data page v1) or compressed and concatenated buffer (def levels + rep levels + compressed values for data page v2).
The difference with Page
is that Page
buffer is always uncompressed.
Implementations§
source§impl CompressedPage
impl CompressedPage
sourcepub fn new(compressed_page: Page, uncompressed_size: usize) -> Self
pub fn new(compressed_page: Page, uncompressed_size: usize) -> Self
Creates CompressedPage
from a page with potentially compressed buffer and
uncompressed size.
sourcepub fn compressed_page(&self) -> &Page
pub fn compressed_page(&self) -> &Page
Returns underlying page with potentially compressed buffer.
sourcepub fn uncompressed_size(&self) -> usize
pub fn uncompressed_size(&self) -> usize
Returns uncompressed size in bytes.
sourcepub fn compressed_size(&self) -> usize
pub fn compressed_size(&self) -> usize
Returns compressed size in bytes.
Note that it is assumed that buffer is compressed, but it may not be. In this case compressed size will be equal to uncompressed size.
sourcepub fn num_values(&self) -> u32
pub fn num_values(&self) -> u32
Number of values in page.
Auto Trait Implementations§
impl !Freeze for CompressedPage
impl RefUnwindSafe for CompressedPage
impl Send for CompressedPage
impl Sync for CompressedPage
impl Unpin for CompressedPage
impl UnwindSafe for CompressedPage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more