Compression wo copy

If you have 10G buffer log file there is no need to copy it twice. It just consumes additional space and IO operations.
You should check buffer type because `memory` buffer stores chunk in memory.