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

[Feature]: Packed Encoding #93

Open
1 task done
jonatino opened this issue Sep 10, 2023 · 2 comments
Open
1 task done

[Feature]: Packed Encoding #93

jonatino opened this issue Sep 10, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@jonatino
Copy link

jonatino commented Sep 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Description

Looking to get packed encoding support added. I use CBOR to save cached OCR data
image

the file is around 8.6mb which is around 50% smaller than the JSON equivalent. Reading the cbor file in a hex editor shows a lot of stuff are repeated like field names/certain fields that repeat the same value over and over.

Packed encoding would be wonderful 😄

Acceptance Criteria

  • Works
  • Smaller file size

Suggestions for a technical implementation

No response

@raylu
Copy link

raylu commented Oct 16, 2023

would love to be able to send packed CBOR to my frontend to decode with https://github.com/kriszyp/cbor-x#cbor-packing

@raylu raylu mentioned this issue Oct 16, 2023
1 task
@TheButlah
Copy link

Would love packed encoding. We are trying to use ciborium to communicate with a microprocessor and we need to use integer based field names, payloads are 10x smaller this way.

Additionally, integer based names are helpful for evolution of schemas over time - for example, take a look at how minicbor_derive works. By using integers for names, fields can be renamed in code without breaking binary compatiblity (much like protobufs/flatbuffers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: New
Development

No branches or pull requests

3 participants