Serialization of a bounded int table using bin_io or sexp preserves num_keys, but only takes space proportional to the length of the table.
bin_io
sexp
num_keys
length
of_alist returns a table whose maximum allowed key is the maximum key in the input list.
of_alist