摘要 |
Compression of floating-point numbers is realized by comparing the exponents of the floating-point numbers to one or more exponent thresholds to classify the floating-point numbers into classes. The floating-point number is encoded using the compression type for its class. Each class is associated with an indicator. A compressed data packet contains an indicator array and encoded floating-point numbers. Alternatively, exponents, mantissas and signs of floating¬ point numbers are compressed. Differences between exponents are encoded by exponent tokens selected from a code table. The mantissa is encoded to a mantissa token having a length based on the exponent. Alternatively for a group of floating-point numbers, encoding the maximum exponent produces the exponent token and encoding each mantissa of the group produces mantissa tokens having a length based on the maximum exponent. Signs are encoded to produce sign tokens. Exponent tokens, mantissa tokens and sign tokens are packed in a compressed data packet. |