fix chunk header size prediction

This commit is contained in:
2025-12-14 12:06:56 -08:00
parent 99fb761a1d
commit a5d5b30e0c

View File

@@ -760,9 +760,10 @@ pub fn serialize<W:binrw::BinWriterExt>(block:&Block,writer:&mut W)->Result<(),b
self.0
.iter()
.enumerate()
.map(|(i,range)|
range.len()*EVENT_SIZE[i]
)
.filter_map(|(i,range)|match range.len(){
0=>None,
other=>Some(other*EVENT_SIZE[i]+size_of::<EventChunkHeader>()),
})
.sum()
}
}