Resource packer and unpacker