Commit Graph

23 Commits

Author SHA1 Message Date
Elliot Nunn
e9f9154dff Squash bugs found testing compression 2018-12-13 16:41:20 +08:00
Elliot Nunn
fbdb8eb61a Ditch FakeResDecompress in preparation for Max's 2018-12-13 16:05:11 +08:00
Elliot Nunn
29982335a6 Neaten bad-compression case 2018-12-11 17:31:17 +08:00
Elliot Nunn
931529bc7c Revise error model
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.
2018-12-11 17:18:41 +08:00
Elliot Nunn
5a318f78ef Expand > extract 2018-12-11 16:06:20 +08:00
Elliot Nunn
408ff20637 Miscellany 2018-12-11 15:50:14 +08:00
Elliot Nunn
3e2f151b6e Fix Rez codegen 2018-12-11 15:50:14 +08:00
Elliot Nunn
bbc88c54a9 Cache the compressed form of a resource
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.
2018-12-11 15:50:14 +08:00
Elliot Nunn
640ece9c1d Create compress/extract stubs 2018-12-11 15:50:14 +08:00
Elliot Nunn
01c8adb82f Make rount-tripping properties clearer 2018-12-11 15:50:09 +08:00
Elliot Nunn
57bd293326 Roundtrip fix: tabs etc in resource names 2018-12-09 13:32:53 +08:00
Elliot Nunn
b21a7a4595 Correctly document non-DeRez-like options 2018-12-09 13:19:49 +08:00
Elliot Nunn
ad96f756d2 Keep fake header out-of-channel 2018-12-09 12:53:15 +08:00
Elliot Nunn
bda55a52b2 Support compressed resources 2018-11-10 18:05:43 +08:00
Elliot Nunn
f0ba2cba57 Add hack to save the header into a resource 2018-11-09 20:55:06 +08:00
Elliot Nunn
6187243466 Allow arbitrary resource alignment 2018-10-24 11:27:45 +08:00
Elliot Nunn
a515b88c7f Make the Python "wheel" work right 2018-10-23 20:11:11 +08:00
Elliot Nunn
0be371a99b Add a gitignore! 2018-10-23 20:10:49 +08:00
Elliot Nunn
e55c2ee7d7 Roundtrip fix: Rez is very cautious about */ 2018-10-23 20:10:38 +08:00
Elliot Nunn
9cbc8a1bc4 Roundtrip fix: empty name is different to no name 2018-10-23 20:09:45 +08:00
Elliot Nunn
73009e7aa9 Stop trying to sort resources
Definitely didn't match Rez's behaviour
2018-10-23 19:15:58 +08:00
Elliot Nunn
ea2048c509 Finish renaming package 2018-10-23 19:15:18 +08:00
Elliot Nunn
56d16589e1 Initial commit (works, not documented) 2018-10-21 18:43:26 +08:00