lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.1k stars 252 forks source link

Remove double byte copy in lz4 unsafe utils #182

Open Tim-Brooks opened 3 years ago

Tim-Brooks commented 3 years ago

Currently in LZ4UnsafeUtils#safeIncrementalCopy every byte is copied twice. First the byte is copied using the normal byte array syntax and then the byte is copied using unsafe. Only one of these copies is needed. This commit deletes the non-unsafe copy.