Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor format to allow streaming chunk writing #4

Closed
ecton opened this issue Dec 16, 2022 · 1 comment
Closed

Refactor format to allow streaming chunk writing #4

ecton opened this issue Dec 16, 2022 · 1 comment

Comments

@ecton
Copy link
Member

ecton commented Dec 16, 2022

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
Copy link
Member Author

ecton commented Jan 2, 2023

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

@ecton ecton closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant