I would like to know how to use the compress and uncompress methods on the ByteArray class, what they are useful for and any drawbacks to using them.
Unless I am mis-understanding the problem, you use ByteArray's compress function to compress and uncompress to uncompress.
This is a fairly simple request to fullfil. The ByteArray Class already provides you with ability to compress/uncompress. It even provides two different compression algorithms: zlib & deflate. So, if bytes is your ByteArray to compress using the zlib algorithm:
bytes.compress();
And to uncompress:
bytes.uncompress();
You could also compress using the deflate algorithm:
bytes.deflate();
And to inflate:
bytes.inflate();
+