Move subset of ByteArray to a shared class.
Remove deflate libs, use existing inflate implementation in ByteArray instead.
Relax test case.