comparison OrthancFramework/Sources/HttpServer/HttpStreamTranscoder.cpp @ 4298:db3932f9660d

abi continued
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Nov 2020 18:21:03 +0100
parents bf7b9edf6b81
children d9473bd5ed43
comparison
equal deleted inserted replaced
4297:785a2713323e 4298:db3932f9660d
96 96
97 return HttpCompression_None; 97 return HttpCompression_None;
98 } 98 }
99 } 99 }
100 100
101 HttpStreamTranscoder::HttpStreamTranscoder(IHttpStreamAnswer &source, CompressionType compression) :
102 source_(source),
103 sourceCompression_(compression),
104 bytesToSkip_(0),
105 skipped_(0),
106 currentChunkOffset_(0),
107 ready_(false)
108 {
109 }
110
101 111
102 HttpCompression HttpStreamTranscoder::SetupHttpCompression(bool gzipAllowed, 112 HttpCompression HttpStreamTranscoder::SetupHttpCompression(bool gzipAllowed,
103 bool deflateAllowed) 113 bool deflateAllowed)
104 { 114 {
105 if (ready_) 115 if (ready_)
118 return SetupZlibCompression(deflateAllowed); 128 return SetupZlibCompression(deflateAllowed);
119 129
120 default: 130 default:
121 throw OrthancException(ErrorCode_NotImplemented); 131 throw OrthancException(ErrorCode_NotImplemented);
122 } 132 }
133 }
134
135 bool HttpStreamTranscoder::HasContentFilename(std::string &filename)
136 {
137 return source_.HasContentFilename(filename);
138 }
139
140 std::string HttpStreamTranscoder::GetContentType()
141 {
142 return source_.GetContentType();
123 } 143 }
124 144
125 145
126 uint64_t HttpStreamTranscoder::GetContentLength() 146 uint64_t HttpStreamTranscoder::GetContentLength()
127 { 147 {