From cd210c95a5a429293aa5c88965d3526116ba8723 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 8 Mar 2011 17:49:23 +0000 Subject: The new float format is in place. The encoder/decoder may not be as fast right now as it could be, but it is universal, which is preferable in many cases. We effectively use a normalized base-256 format to store the number, with a scale, also with a base of 256. Basically, with x86 doubles, the C99 standard textual, lossless hex encoding format is at max 23 bytes. This encoding is equivelent but at max 11 bytes, including the format specifier ('f'). --- src/object.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/object.cpp') diff --git a/src/object.cpp b/src/object.cpp index 1908904..af81017 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -46,7 +46,8 @@ Gats::Object *Gats::Object::read( Bu::Stream &rIn ) pObj = new Gats::Dictionary(); break; - case 'f': + case 'f': // Normal floats + case 'F': // Special float values pObj = new Gats::Float(); break; -- cgit v1.2.3