Use dict_calc_buffer_size() to calculate the overhead instead of hardcod...

...ing it.

@chrisc11 like?