Bug fixes, first pass on decompression, and tests

Change-Id: Ib9edfc6e71922d81bbe6749dd2da4543aa918a02