Finish up source export

This commit is contained in:
elasota
2020-10-19 18:51:18 -04:00
parent 1b4754ae13
commit f26f631ae2
3 changed files with 261 additions and 89 deletions

View File

@@ -195,8 +195,9 @@ bool PortabilityLayer::DeflateContextImpl::Flush()
return true;
}
PortabilityLayer::DeflateContext *PortabilityLayer::DeflateContext::Create(GpIOStream *stream, int compressionLevel)
{
{
void *storage = PortabilityLayer::MemoryManager::GetInstance()->Alloc(sizeof(PortabilityLayer::DeflateContextImpl));
if (!storage)
return nullptr;
@@ -210,3 +211,8 @@ PortabilityLayer::DeflateContext *PortabilityLayer::DeflateContext::Create(GpIOS
return obj;
}
uint32_t PortabilityLayer::DeflateContext::CRC32(uint32_t inputValue, const void *buffer, size_t bufferLength)
{
return crc32(inputValue, static_cast<const Bytef*>(buffer), bufferLength);
}

View File

@@ -15,6 +15,8 @@ namespace PortabilityLayer
virtual bool Append(const void *buffer, size_t size) = 0;
virtual bool Flush() = 0;
static uint32_t CRC32(uint32_t inputValue, const void *buffer, size_t bufferLength);
};
class DeflateCodec