separate bytebuffer package from encoding