fix chunk header size prediction
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user