Clarification on encoding of "unused bits" (wrt float, double); if/how to fix Jackson codec?

15 views
Skip to first unread message

Tatu Saloranta

unread,
Feb 20, 2022, 1:03:35 PM2/20/22
to smile-forma...@googlegroups.com
I have started addressing requests for clarification for various
issues: thank you very much for all filed issues and apologies for
slow follow-up.
But I will try to do better in the near future: data formats really
rely on their specifications being unambiguous, complete and ideally
readable.

With respect to this particular clarification on

https://github.com/FasterXML/smile-format-specification/blob/master/smile-specification.md

the issue itself ("Should clarify expected handling of unused bits for
float and double value encoding"):

https://github.com/FasterXML/smile-format-specification/issues/17

is simple enough and I basically stated that "unused bits SHOULD be
encoded as zeroes; decoder MUST NOT fail by default, MUST ignore
information".
This to keep expectations compatible.

However: it seems that Jackson Smile encoder deviates from encoding
aspect, as per:

https://github.com/FasterXML/jackson-dataformats-binary/issues/300

and I would like to fix that. I realize however that it is possible
some decoders somewhere might rely on existing (now specified as)
non-compliant behavior.
With that, I would be:

1. interested in hearing what others think about what to do wrt
Jackson Smile encoder (change or not; in which version; configurable?)
2. grateful if anyone was interested in working on change (it should
be relatively small; testing is most important)

and more generally, I really hope to get more feedback about
specification itself, maybe PRs for improved wording and so on.

-+ Tatu +-
Reply all
Reply to author
Forward
0 new messages