Use a Core Erlang module to preallocate the compressed binary