Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk committed Jul 18, 2024
1 parent 0b7a285 commit ace2fe2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion geomedea/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ pub(crate) struct PageHeader {
encoded_page_length: u32,

/// The number of bytes after decompression. This is the number of bytes that will be
/// read from the page to decode the features.k
/// read from the page to decode the features.
decoded_page_length: u32,

/// How many features are in this page.
feature_count: u32,
}

Expand Down
6 changes: 5 additions & 1 deletion geomedea/src/writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ pub struct Writer<W: Write> {
page_size_goal: u64,
}

// How large should we make each page of feature data
// before starting a new page.
const DEFAULT_PAGE_SIZE_GOAL: u64 = 1024 * 64;

impl<W: Write> Writer<W> {
pub fn new(inner: W, is_compressed: bool) -> Result<Self> {
let header = Header {
Expand All @@ -39,7 +43,7 @@ impl<W: Write> Writer<W> {
feature_entries: vec![],
extent: Bounds::empty(),
header,
page_size_goal: 1024 * 64, // REVIEW: what should default limit be?
page_size_goal: DEFAULT_PAGE_SIZE_GOAL,
})
}

Expand Down

0 comments on commit ace2fe2

Please sign in to comment.