libBERT
libBERT copied to clipboard
Change BERT_MAX_INT and BERT_MIN_INT
Issue: #6
The int should be 4 bytes ((232) - 1) and (-(232)) which means ((1 << 31) - 1) and (-(1<<31))
Change:
- BERT_MAX_INT ((1 << 31) - 1)
- BERT_MIN_INT (-(1 << 31))
It's been a while since I worked on this library, but the MAX_INT
/MIN_INT
values come from other BERT libraries:
https://github.com/mojombo/bert/blob/c2abcc4868bb47909696c6a42c606de34e83ef70/lib/bert/types.rb#L18-L19
I can't find where they are exactly defined in the Erlang External Term Format specification.
Thanks for your reply. It's been a while, and we switch to another encoding.
By the way, I found documentation about integer size on erlang website: http://erlang.org/doc/apps/erts/erl_ext_dist.html#integer_ext.
Hope this helps.