diff OrthancFramework/Sources/Enumerations.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 08b5516c6e5e
children
line wrap: on
line diff
--- a/OrthancFramework/Sources/Enumerations.cpp	Tue Oct 17 15:06:11 2023 +0200
+++ b/OrthancFramework/Sources/Enumerations.cpp	Sat Nov 04 13:42:30 2023 +0100
@@ -35,26 +35,6 @@
 
 namespace Orthanc
 {
-  static const char* const MIME_CSS = "text/css";
-  static const char* const MIME_DICOM = "application/dicom";
-  static const char* const MIME_GIF = "image/gif";
-  static const char* const MIME_GZIP = "application/gzip";
-  static const char* const MIME_HTML = "text/html";
-  static const char* const MIME_JAVASCRIPT = "application/javascript";
-  static const char* const MIME_JPEG2000 = "image/jp2";
-  static const char* const MIME_NACL = "application/x-nacl";
-  static const char* const MIME_PLAIN_TEXT = "text/plain";
-  static const char* const MIME_PNACL = "application/x-pnacl";
-  static const char* const MIME_SVG = "image/svg+xml";
-  static const char* const MIME_WEB_ASSEMBLY = "application/wasm";
-  static const char* const MIME_WOFF = "application/x-font-woff";
-  static const char* const MIME_WOFF2 = "font/woff2";
-  static const char* const MIME_XML_2 = "text/xml";
-  static const char* const MIME_ZIP = "application/zip";
-  static const char* const MIME_DICOM_WEB_JSON = "application/dicom+json";
-  static const char* const MIME_DICOM_WEB_XML = "application/dicom+xml";
-  static const char* const MIME_ICO = "image/x-icon";
-
   // This function is autogenerated by the script
   // "Resources/CodeGeneration/GenerateErrorCodes.py"
   const char* EnumerationToString(ErrorCode error)
@@ -2488,6 +2468,19 @@
       throw OrthancException(ErrorCode_InternalError);
     }
   }
+
+  bool IsCompressedTransferSyntax(DicomTransferSyntax syntax)
+  {
+    switch (syntax)
+    {
+      case DicomTransferSyntax_LittleEndianImplicit:
+      case DicomTransferSyntax_LittleEndianExplicit:
+      case DicomTransferSyntax_BigEndianExplicit:
+        return false;
+      default:
+        return true;
+    }
+  }
 }