diff --git a/src/ripple/nodestore/impl/codec.h b/src/ripple/nodestore/impl/codec.h index c3610aa121..191f46baed 100644 --- a/src/ripple/nodestore/impl/codec.h +++ b/src/ripple/nodestore/impl/codec.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -38,44 +37,6 @@ namespace ripple { namespace NodeStore { -template -std::pair -snappy_compress (void const* in, - std::size_t in_size, BufferFactory&& bf) -{ - std::pair result; - auto const out_max = - snappy::MaxCompressedLength(in_size); - void* const out = bf(out_max); - result.first = out; - snappy::RawCompress( - reinterpret_cast(in), - in_size, reinterpret_cast(out), - &result.second); - return result; -} - -template -std::pair -snappy_decompress (void const* in, - std::size_t in_size, BufferFactory&& bf) -{ - std::pair result; - if (! snappy::GetUncompressedLength( - reinterpret_cast(in), - in_size, &result.second)) - Throw ( - "snappy decompress: GetUncompressedLength"); - void* const out = bf(result.second); - result.first = out; - if (! snappy::RawUncompress( - reinterpret_cast(in), in_size, - reinterpret_cast(out))) - Throw ( - "snappy decompress: RawUncompress"); - return result; -} - template std::pair lz4_decompress (void const* in,