diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-03-08 17:49:23 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-03-08 17:49:23 +0000 |
commit | cd210c95a5a429293aa5c88965d3526116ba8723 (patch) | |
tree | 0a3d42cbdfa9f47c735d5436adf129616105eb44 /src/object.cpp | |
parent | a5009d2e8c0378180dd3aca39c10c1dc0af3a93e (diff) | |
download | libgats-cd210c95a5a429293aa5c88965d3526116ba8723.tar.gz libgats-cd210c95a5a429293aa5c88965d3526116ba8723.tar.bz2 libgats-cd210c95a5a429293aa5c88965d3526116ba8723.tar.xz libgats-cd210c95a5a429293aa5c88965d3526116ba8723.zip |
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').
Diffstat (limited to 'src/object.cpp')
-rw-r--r-- | src/object.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 ) | |||
46 | pObj = new Gats::Dictionary(); | 46 | pObj = new Gats::Dictionary(); |
47 | break; | 47 | break; |
48 | 48 | ||
49 | case 'f': | 49 | case 'f': // Normal floats |
50 | case 'F': // Special float values | ||
50 | pObj = new Gats::Float(); | 51 | pObj = new Gats::Float(); |
51 | break; | 52 | break; |
52 | 53 | ||