@Override
OutputStream encode(final OutputStream out, final byte[] password)
throws IOException {
LZMA2Options options = new LZMA2Options();
options.setDictSize(LZMA2Options.DICT_SIZE_DEFAULT);
FinishableOutputStream wrapped = new FinishableWrapperOutputStream(out);
return new FinishOnCloseStream(options.getOutputStream(wrapped));
}