44 #define DISABLE_SPLIT_DESCRIPTIONS false
45 #define DISABLE_SPLIT_ASSEMBLY true
49 : m_MinChunkCount(kDefaultMinChunkCount),
50 m_Compression(eCompression_none),
53 m_DisableSplitSequence(
false),
54 m_DisableSplitAnnotations(
false),
56 m_JoinSmallChunks(
false),
57 m_SplitWholeBioseqs(
true),
58 m_SplitNonFeatureSeqTables(kDefaultSplitNonFeatureSeqTables)
76 list<vector<char>*>& dst,
80 dst.push_back(vec =
new vector<char>);
88 dst.push_back(vec =
new vector<char>);
115 size_t pos = dst.size();
117 dst.resize(pos + 32 +
size_t(
double(
size)*1.01));
118 size_t real_size = 0;
120 &dst[pos+8], dst.size()-(pos+8),
123 "zip compression failed");
125 for (
size_t i = 0, s = real_size;
i < 4; ++
i, s <<= 8 ) {
126 dst[pos+
i] = char(s >> 24);
128 for (
size_t i = 0, s =
size;
i < 4; ++
i, s <<= 8 ) {
129 dst[pos+4+
i] = char(s >> 24);
131 dst.resize(pos+8+real_size);
136 "compression method is not implemented");
153 "compression method is not implemented");
168 size_t pos = dst.size();
169 dst.resize(pos +
size);
static const size_t kChunkSize
#define DISABLE_SPLIT_ASSEMBLY
#define DISABLE_SPLIT_DESCRIPTIONS
static void CompressFooter(const SSplitterParams ¶ms, vector< char > &dst, size_t size)
static void CompressHeader(const SSplitterParams ¶ms, vector< char > &dst, size_t size)
static void sx_Append(vector< char > &dst, const char *data, size_t size)
static void CompressChunk(const SSplitterParams ¶ms, vector< char > &dst, const char *data, size_t size)
static void Compress(const SSplitterParams ¶ms, list< vector< char > * > &dst, const char *data, size_t size)
static const int chunk_size
virtual bool CompressBuffer(const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)
Compress data in the buffer.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
const struct ncbi::grid::netcache::search::fields::SIZE size
void SetChunkSize(size_t size)
ECompression m_Compression