Check lengths of input arrays on entry methods to avoid unchecked access to data when unsafe is used to access them.
Unit tests for various combinations of bad uncompressed/compressed data lengths.
Also fail faster on one corrupted data case.