dain / leveldb

Port of LevelDB to Java
Apache License 2.0
1.54k stars 429 forks source link

What's the different between CompressionType.SNAPPY and NONE #107

Closed zhangtianxiao closed 5 years ago

zhangtianxiao commented 5 years ago

NONE will faster ?

dain commented 5 years ago

NONE does not compress at all which saves CPU at the cost of more IO. SNAPPY uses the https://github.com/google/snappy compression algorithm which is very efficient, but will cost some CPU. I believe most people use SNAPPY, because the additional CPU usage is cheaper that the additional flash storage cost.