#include <VecCompressor.h>
Static Public Member Functions | |
signed char * | compressVec (const Vec &v, signed char *data) |
void | uncompressVec (signed char *data, const Vec &v) |
uncompresses the data of a vector compressed with compressVec v must have the correct size. | |
void | writeCompressedVec (ostream &out, const Vec &v) |
writes v in compressed format to the given stream The written data does not contain size info. | |
void | readCompressedVec (istream &in, const Vec &v) |
reads data of a compressed vector from the given stream v must have the right size already (this is not checked!) | |
size_t | worstCaseSize (int n) |
Returns the number of bytes that will be used to encode a vector of length n in the worst case. | |
Static Protected Member Functions | |
bool | issmallint (real x) |
bool | is0 (real x) |
bool | isI (real x) |
bool | isF (real x) |
Definition at line 58 of file VecCompressor.h.
|
writes v in a compressed form in the data buffer passed as argument. (make sure enough memory is allocated in the data buffer) returns a pointer to the one-after-last element written in the data block Definition at line 48 of file VecCompressor.cc. References count, PLearn::TVec< T >::data(), is0(), isF(), isI(), issmallint(), PLearn::TVec< T >::length(), mode, val, and PLearn::Vec. |
|
Definition at line 65 of file VecCompressor.h. Referenced by compressVec(), is0(), and writeCompressedVec(). |
|
Definition at line 71 of file VecCompressor.h. Referenced by compressVec(), isF(), and writeCompressedVec(). |
|
Definition at line 68 of file VecCompressor.h. Referenced by compressVec(), isI(), and writeCompressedVec(). |
|
Definition at line 62 of file VecCompressor.h. References issmallint(), and x. Referenced by compressVec(), issmallint(), and writeCompressedVec(). |
|
reads data of a compressed vector from the given stream v must have the right size already (this is not checked!)
Definition at line 391 of file VecCompressor.cc. References count, PLearn::TVec< T >::data(), PLearn::TVec< T >::length(), mode, PLERROR, and PLearn::read_sbyte(). |
|
uncompresses the data of a vector compressed with compressVec v must have the correct size.
Definition at line 182 of file VecCompressor.cc. References count, PLearn::TVec< T >::data(), PLearn::TVec< T >::length(), mode, and PLERROR. |
|
Returns the number of bytes that will be used to encode a vector of length n in the worst case.
Definition at line 95 of file VecCompressor.h. References worstCaseSize(). Referenced by worstCaseSize(). |
|
writes v in compressed format to the given stream The written data does not contain size info.
Definition at line 267 of file VecCompressor.cc. References count, PLearn::TVec< T >::data(), is0(), isF(), isI(), issmallint(), PLearn::TVec< T >::length(), mode, val, and PLearn::write_sbyte(). |