summaryrefslogtreecommitdiff
path: root/source/core/slang-riff.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-01-11 15:24:11 -0500
committerGitHub <noreply@github.com>2021-01-11 15:24:11 -0500
commit723796a0a0fed8e5b8c3222b1c90443189113098 (patch)
tree41fa039f2f2fcec4c24746203ad119a8054f021a /source/core/slang-riff.cpp
parent5554777188225266e2295db3588f6cb17cae0c4d (diff)
LZ4 compression support (#1654)
* #include an absolute path didn't work - because paths were taken to always be relative. * Testing out use of lz4. * Added ICompressionSystem, and LZ4 implementation. * Add support for deflate compression. Simplify compression interface - to make more easily work across apis. * WIP on CompressedFileSystem. * ImplicitDirectoryCollector * SubStringIndexMap - > StringSliceIndexMap. * WIP save stdlib in different containers. * Support for different archive types for stdlib. * Fix project. * CompressedFileSystem -> ArchiveFileSystem. Added CompressionSystemType::None * Added ArchiveFileSystem * Fix problem RiffFileSystem load withoug compression system. * Test archive types. Improve diagnostic message. * Fix typo in testing file system archives. * Split out archive detection. * Fix gcc warning issue. * Fix warning. * RiffArchiveFileSystem -> RiffFileSystem Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'source/core/slang-riff.cpp')
-rw-r--r--source/core/slang-riff.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/core/slang-riff.cpp b/source/core/slang-riff.cpp
index d64cd89c7..482c35e81 100644
--- a/source/core/slang-riff.cpp
+++ b/source/core/slang-riff.cpp
@@ -851,6 +851,13 @@ void RiffContainer::endChunk()
SLANG_ASSERT(isChunkOk(chunk));
}
+void RiffContainer::addDataChunk(FourCC dataFourCC, const void* data, size_t dataSizeInBytes)
+{
+ startChunk(Chunk::Kind::Data, dataFourCC);
+ write(data, dataSizeInBytes);
+ endChunk();
+}
+
void RiffContainer::setPayload(Data* data, const void* payload, size_t size)
{
// We must be in a data chunk