- * The return value is %true if the chunk was successfully submitted, or
- * %false if the chunk compressor does not have space for the chunk at
- * the present time. In the latter case, get_chunk() must be called to
- * retrieve a compressed chunk before trying again. */
- bool (*submit_chunk)(struct chunk_compressor *, const void *, u32);
+ * Returns a pointer to the buffer, or NULL if no buffer is available.
+ * If no buffer is available, you must call ->get_compression_result()
+ * to retrieve a compressed chunk before trying again. */
+ void *(*get_chunk_buffer)(struct chunk_compressor *);
+
+ /* Signals to the chunk compressor that the buffer which was loaned out
+ * from ->get_chunk_buffer() has finished being filled and contains the
+ * specified number of bytes of uncompressed data. */
+ void (*signal_chunk_filled)(struct chunk_compressor *, u32);