class BZip2Compressor implements OptionCompressor<T> {

  @Override
  public byte[] compress(T option) throws IOException {
    ByteArrayOutputStream compressedStream = new ByteArrayOutputStream();
    try (BZip2CompressorOutputStream bzip2Output =
        new BZip2CompressorOutputStream(compressedStream)) {
      bzip2Output.write(byteConverter.toByte(option));
    }

    return compressedStream.toByteArray();
  }

  public  BZip2Compressor(OptionByteConverter<T> byteConverter);

}