Exported rice compression functions.