aboutsummaryrefslogtreecommitdiff
path: root/scripts/zstd.py
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-03-29 22:59:04 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2020-03-29 22:59:04 +0300
commit13771971cfaef6356ba47668cae6ce25c5c2071f (patch)
treef2706c35edb06cbf43fc18a7c30608dfea67587f /scripts/zstd.py
parentChange rcc command line (diff)
downloadrcc-13771971cfaef6356ba47668cae6ce25c5c2071f.tar.xz
Drop dependency on serge-sans-paille/frozen
format: - instead of frozen::unordered_map, create two std::arrays with the aliased names (entries) and respective data (values) libembed: - Resources and CompressedResources convenience classes for raw and compressed resources respectively - Resources can be constexpr in regular usage - Annotate Resources::decompress accordingly
Diffstat (limited to 'scripts/zstd.py')
-rw-r--r--scripts/zstd.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/zstd.py b/scripts/zstd.py
index f85e7da..2cfa149 100644
--- a/scripts/zstd.py
+++ b/scripts/zstd.py
@@ -16,6 +16,8 @@ def zstd(filelist, args):
if args.dict is not None:
write_item(args.output, 'dict', args.dict.read())
print("constexpr auto dictionary = std::span(dict, dict_len);", file=args.output)
+ else:
+ print("constexpr std::span<const uint8_t> dictionary {};", file=args.output)
print("constexpr auto compression = embed::Zstd;", file=args.output)