Implemented a custom double packing

Double is packed in a custom way and not IEEE format to bytes.