MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Snappy_Compress

Function Snappy_Compress

tensorflow/core/platform/posix/port.cc:324–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322std::size_t MallocExtension_GetAllocatedSize(const void* p) { return 0; }
323
324bool Snappy_Compress(const char* input, size_t length, string* output) {
325#ifdef TF_USE_SNAPPY
326 output->resize(snappy::MaxCompressedLength(length));
327 size_t outlen;
328 snappy::RawCompress(input, length, &(*output)[0], &outlen);
329 output->resize(outlen);
330 return true;
331#else
332 return false;
333#endif
334}
335
336bool Snappy_GetUncompressedLength(const char* input, size_t length,
337 size_t* result) {

Callers 4

WriteBlockMethod · 0.50
DeflateMethod · 0.50

Calls 1

resizeMethod · 0.45

Tested by 2