qoollo/pearl

Record header checksum should be calculated without additional header srialization

ikopylov opened this issue · 0 comments

Currently, header checksum calculation calls serialization: https://github.com/qoollo/pearl/blob/master/src/record.rs#L240
We can improve the things by calculating the header checksum directly in to_raw function: in this function serialization can be called with 0 in header_checksum field, then CRC can be calculated on the serialized data, then the result can be written directly into serialized bytes vector by hand.