Which is the default format used, Frame format or Block format?

1,908 views
Skip to first unread message

Vishnu s kumar

unread,
Mar 28, 2016, 9:09:33 PM3/28/16
to LZ4c
The LZ4 has two formats the block and frame format.
1. Which one of these is used as a default format for compression/decompression ? 
2. How to manually  choose one format among this ?

Takayuki Matsuoka

unread,
Mar 28, 2016, 10:11:16 PM3/28/16
to LZ4c
Hi Vishnu,


> 1. Which one of these is used as a default format for compression/decompression ?
There is no default format.
But as a first step, I recommend "Frame Format" for interoperability and ease of use.  And also you can encode/decode Frame Format file with standard LZ4 command line utility.  It's quite useful for debug and testing :)
If you want to write an advanced application which has specific limitations (e.g. tight working memory/bandwidth/size/speed budget), use "Block Format" to satisfy your condition.


> 2. How to manually  choose one format among this ?

Usually, you can choose a format via API.
For example, original LZ4 (C or C++) API functions in lz4.h are for "Block Format" (raw LZ4).  And all functions in lz4frame.h are for "Frame Format".
For another example, in node-lz4 you can see stream (Frame Format) API
https://github.com/pierrec/node-lz4#encoding
and "Block level" (Block Format) API
https://github.com/pierrec/node-lz4#block-level-encodingdecoding

Hope this helps.

Regards,
Message has been deleted

Vishnu s kumar

unread,
Mar 28, 2016, 10:38:50 PM3/28/16
to LZ4c
Hi Takayuki Matsuoka ,

Thank You very Much !!!!!!!!!!
Reply all
Reply to author
Forward
0 new messages