Skip to content

Conversation

@wilson1yan
Copy link
Contributor

@wilson1yan wilson1yan commented Dec 31, 2025

The old auto-calculation for computing how many bytes to encode an int didn't work in some edge cases:

  1. negative numbers
  2. some signed numbers (e.g. > 127 assigned only 1 byte when it should be 2)

Technically right now there's a case (e.g. -128) which only needs 1 byte but right now it will calculate it to be 2 b/c of the asymmetry (1 byte can represent -128 to 127). Would just take a little of extra code by checking sign of value and if signed=True

@danijar danijar force-pushed the main branch 5 times, most recently from 2767092 to 9b547e5 Compare January 2, 2026 22:38
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

Successfully merging this pull request may close these issues.

1 participant