The problem is this: a user might want to edit a resource compressed
using an unknown algorithm. This should fail by default, because after
all, the resource is garbage. But the expert user (say Daniel wrote a
new algo) might know better, and set the expand_err_ok attribute on a
Resource object before accessing and editing its data attribute.
This can be used to defer time-consuming decompression of a compressed
resource, until the user actually asks for the decompressed form by
accessing the Resource.data attribute. Even when decompression is
requested, keep the cache and associate it with the hash of the
decompressed data, so that very time-consuming recompression can be
avoided while the Resource.data attribute is not changed.
This should be transparent to the user, who only cares about the
always-decompressed Resource.data attribute, and maybe the
Resource.compression_format attribute at a stretch. Note that it is safe
to change Resource.compression_format: it will never corrupt data.