title: Snappy: How can I snappy compress byte buffer type?
body: <p>In my Java code, I have data of type <code>java.nio.ByteBuffer</code>. I have to snappy compress this. Using <code>Snappy.compress()</code> by importing <code>org.xerial.snappy.Snappy;</code> throws an error.</p>
  
  <pre><code>Snappy.compress(DataUtility.parseValue(record.valueSchema(), record.value())))
  </code></pre>
  
  <p>Do I need to convert this to another type before compressing or do I have to use a different compression method? </p>
  
  <p>Thank you!</p>