comparison OrthancServer/Sources/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 5406:aaf7c49a9ddc am-http-compression

tentative to implement smart HTTP compression with detection of transfer syntax
author Alain Mazy <am@osimis.io>
date Sat, 04 Nov 2023 13:42:30 +0100
parents 303e930fff0f
children
comparison
equal deleted inserted replaced
5405:62bb63346185 5406:aaf7c49a9ddc
217 s.insert(targetSyntax); 217 s.insert(targetSyntax);
218 218
219 if (context.Transcode(transcoded, source, s, true)) 219 if (context.Transcode(transcoded, source, s, true))
220 { 220 {
221 call.GetOutput().AnswerBuffer(transcoded.GetBufferData(), 221 call.GetOutput().AnswerBuffer(transcoded.GetBufferData(),
222 transcoded.GetBufferSize(), MimeType_Dicom); 222 transcoded.GetBufferSize(),
223 MimeType_Dicom,
224 (IsCompressedTransferSyntax(targetSyntax) ? ContentCompression_AlreadyCompressed : ContentCompression_NotCompressed));
223 } 225 }
224 else 226 else
225 { 227 {
226 throw OrthancException(ErrorCode_InternalError, 228 throw OrthancException(ErrorCode_InternalError,
227 "Cannot transcode to transfer syntax: " + 229 "Cannot transcode to transfer syntax: " +