brk_vec/structs/compressed_page_meta.rs
1use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
2
3#[derive(Debug, Clone, IntoBytes, Immutable, FromBytes, KnownLayout)]
4pub struct CompressedPageMetadata {
5 pub start: u64,
6 pub bytes_len: u32,
7 pub values_len: u32,
8}
9
10impl CompressedPageMetadata {
11 pub fn new(start: u64, bytes_len: u32, values_len: u32) -> Self {
12 Self {
13 start,
14 bytes_len,
15 values_len,
16 }
17 }
18}