comparison OrthancFramework/Sources/Compression/DeflateBaseCompressor.cpp @ 4279:ab4d015af660

moving inline methods to source files for ABI compatibility
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Nov 2020 20:48:01 +0100
parents bf7b9edf6b81
children 785a2713323e
comparison
equal deleted inserted replaced
4278:9279de56a405 4279:ab4d015af660
28 28
29 #include <string.h> 29 #include <string.h>
30 30
31 namespace Orthanc 31 namespace Orthanc
32 { 32 {
33 DeflateBaseCompressor::DeflateBaseCompressor() :
34 compressionLevel_(6),
35 prefixWithUncompressedSize_(false)
36 {
37 }
38
39
33 void DeflateBaseCompressor::SetCompressionLevel(uint8_t level) 40 void DeflateBaseCompressor::SetCompressionLevel(uint8_t level)
34 { 41 {
35 if (level >= 10) 42 if (level >= 10)
36 { 43 {
37 throw OrthancException(ErrorCode_ParameterOutOfRange, 44 throw OrthancException(ErrorCode_ParameterOutOfRange,
59 memcpy(&size, compressed, sizeof(uint64_t)); 66 memcpy(&size, compressed, sizeof(uint64_t));
60 67
61 return size; 68 return size;
62 } 69 }
63 70
71
72 void Orthanc::DeflateBaseCompressor::SetPrefixWithUncompressedSize(bool prefix)
73 {
74 prefixWithUncompressedSize_ = prefix;
75 }
76
77 bool DeflateBaseCompressor::HasPrefixWithUncompressedSize() const
78 {
79 return prefixWithUncompressedSize_;
80 }
81
82 uint8_t DeflateBaseCompressor::GetCompressionLevel() const
83 {
84 return compressionLevel_;
85 }
64 } 86 }