khonsulabs/okaywal

Refactor format to allow streaming chunk writing

Closed this issue · 1 comments

ecton commented

Now that I've begun integration in Sediment, I realized that I would prefer chunk data to be written as:

  • Chunk command byte
  • Length (4 bytes)
  • Data (Length bytes)
  • CRC (4 bytes)

By moving the CRC to the end, we can compute it on the fly, which would allow for a ChunkWriter type that could implement Write and allow buffered streaming chunk writing.

ecton commented

Oops, didn't realize I had written an issue for this. Implemented in 9946e27.