Add LZ4
This commit is contained in:
parent
4fbb770a8c
commit
9fa8ed6cca
6 changed files with 8 additions and 2 deletions
|
@ -9,3 +9,7 @@
|
||||||
{erl_opts, [debug_info, {parse_transform, lager_transform}, {parse_transform, eqc_cover}]},
|
{erl_opts, [debug_info, {parse_transform, lager_transform}, {parse_transform, eqc_cover}]},
|
||||||
{plugins, [rebar_eqc]}]}
|
{plugins, [rebar_eqc]}]}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
{deps, [
|
||||||
|
{lz4, ".*", {git, "https://github.com/martinsumner/erlang-lz4", {branch, "mas-leveled"}}}
|
||||||
|
]}.
|
||||||
|
|
|
@ -747,7 +747,8 @@ generate_filenames(RootFilename) ->
|
||||||
%% compression methods. Also, perhaps standardise applictaion of CRC
|
%% compression methods. Also, perhaps standardise applictaion of CRC
|
||||||
%% checks
|
%% checks
|
||||||
serialise_block(Term) ->
|
serialise_block(Term) ->
|
||||||
term_to_binary(Term, ?BINARY_SETTINGS).
|
{ok, Bin} = lz4:pack(term_to_binary(Term)),
|
||||||
|
Bin.
|
||||||
|
|
||||||
|
|
||||||
-spec deserialise_block(binary()) -> any().
|
-spec deserialise_block(binary()) -> any().
|
||||||
|
@ -757,7 +758,8 @@ serialise_block(Term) ->
|
||||||
%% compression methods. Also, perhaps standardise applictaion of CRC
|
%% compression methods. Also, perhaps standardise applictaion of CRC
|
||||||
%% checks
|
%% checks
|
||||||
deserialise_block(Bin) ->
|
deserialise_block(Bin) ->
|
||||||
binary_to_term(Bin).
|
{ok, Bin0} = lz4:unpack(Bin),
|
||||||
|
binary_to_term(Bin0).
|
||||||
|
|
||||||
|
|
||||||
%%%============================================================================
|
%%%============================================================================
|
||||||
|
|
BIN
test/ledger_manifest/nonzero_2.pnd
Normal file
BIN
test/ledger_manifest/nonzero_2.pnd
Normal file
Binary file not shown.
BIN
test/new_file.sst.discarded
Normal file
BIN
test/new_file.sst.discarded
Normal file
Binary file not shown.
BIN
test/range1_src.sst
Normal file
BIN
test/range1_src.sst
Normal file
Binary file not shown.
BIN
test/simple_test.sst.discarded
Normal file
BIN
test/simple_test.sst.discarded
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue