Currently, we unnecessarily restrict decode to only work for symbols of type Int, which defaults to Int32 or Int64 depending on system architecture. There's no reason why it shouldn't be possible to decode a symbol with type e.g. Int16. If the maximum symbol number is known, then it may be useful to use an integer with a smaller typemax.
Making this possible will, for example, enable reducing memory usage when writing code that repeatedly construct large arrays of integer symbols.
Fixing this is just a matter of changing the ::Int annotation in the various decode methods to ::Integer instead.
Currently, we unnecessarily restrict
decode
to only work for symbols of typeInt
, which defaults toInt32
orInt64
depending on system architecture. There's no reason why it shouldn't be possible to decode a symbol with type e.g.Int16
. If the maximum symbol number is known, then it may be useful to use an integer with a smallertypemax
.Making this possible will, for example, enable reducing memory usage when writing code that repeatedly construct large arrays of integer symbols.
Fixing this is just a matter of changing the
::Int
annotation in the variousdecode
methods to::Integer
instead.