File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,14 @@ pub use packets::{Packets, PacketsIter};
1515pub use paginate:: paginate;
1616
1717const CONTINUED_PACKET : u8 = 0x01 ;
18+ pub ( crate ) const MAX_WRITTEN_SEGMENT_COUNT : usize = 32 ;
19+ pub ( crate ) const MAX_WRITTEN_CONTENT_SIZE : usize = MAX_WRITTEN_SEGMENT_COUNT * 255 ;
1820
1921/// The maximum page content size
20- pub const MAX_CONTENT_SIZE : usize = 65025 ;
22+ // NOTE: An OGG page can have up to 255 segments, or ~64KB. We cap it at 32 segments, or ~8KB when writing.
23+ pub const MAX_CONTENT_SIZE : usize = MAX_WRITTEN_CONTENT_SIZE * 4 ;
24+ /// The maximum number of segments a page can contain
25+ pub const MAX_SEGMENT_COUNT : usize = 255 ;
2126/// The packet contains the first page of the logical bitstream
2227pub const CONTAINS_FIRST_PAGE_OF_BITSTREAM : u8 = 0x02 ;
2328/// The packet contains the last page of the logical bitstream
You can’t perform that action at this time.
0 commit comments