comparison OrthancFramework/Sources/Enumerations.h @ 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 33410f14033b
children
comparison
equal deleted inserted replaced
5405:62bb63346185 5406:aaf7c49a9ddc
44 44
45 // Added in Orthanc 1.12.1 45 // Added in Orthanc 1.12.1
46 static const char* const MIME_OBJ = "model/obj"; 46 static const char* const MIME_OBJ = "model/obj";
47 static const char* const MIME_MTL = "model/mtl"; 47 static const char* const MIME_MTL = "model/mtl";
48 static const char* const MIME_STL = "model/stl"; 48 static const char* const MIME_STL = "model/stl";
49
50 static const char* const MIME_CSS = "text/css";
51 static const char* const MIME_DICOM = "application/dicom";
52 static const char* const MIME_GIF = "image/gif";
53 static const char* const MIME_GZIP = "application/gzip";
54 static const char* const MIME_HTML = "text/html";
55 static const char* const MIME_JAVASCRIPT = "application/javascript";
56 static const char* const MIME_JPEG2000 = "image/jp2";
57 static const char* const MIME_NACL = "application/x-nacl";
58 static const char* const MIME_PLAIN_TEXT = "text/plain";
59 static const char* const MIME_PNACL = "application/x-pnacl";
60 static const char* const MIME_SVG = "image/svg+xml";
61 static const char* const MIME_WEB_ASSEMBLY = "application/wasm";
62 static const char* const MIME_WOFF = "application/x-font-woff";
63 static const char* const MIME_WOFF2 = "font/woff2";
64 static const char* const MIME_XML_2 = "text/xml";
65 static const char* const MIME_ZIP = "application/zip";
66 static const char* const MIME_DICOM_WEB_JSON = "application/dicom+json";
67 static const char* const MIME_DICOM_WEB_XML = "application/dicom+xml";
68 static const char* const MIME_ICO = "image/x-icon";
69
49 70
50 /** 71 /**
51 * "No Internet Media Type (aka MIME type, content type) for PBM has 72 * "No Internet Media Type (aka MIME type, content type) for PBM has
52 * been registered with IANA, but the unofficial value 73 * been registered with IANA, but the unofficial value
53 * image/x-portable-arbitrarymap is assigned by this specification, 74 * image/x-portable-arbitrarymap is assigned by this specification,
458 HttpCompression_None, 479 HttpCompression_None,
459 HttpCompression_Deflate, 480 HttpCompression_Deflate,
460 HttpCompression_Gzip 481 HttpCompression_Gzip
461 }; 482 };
462 483
484 // Used to know if the content of an HTTP response is already compressed or not.
485 // If the content is already compressed, using HTTP compression on top of it is meaningless
486 // and consumes a lot of time.
487 enum ContentCompression
488 {
489 ContentCompression_Unknown,
490 ContentCompression_AlreadyCompressed,
491 ContentCompression_NotCompressed,
492 };
463 493
464 // Specific Character Sets 494 // Specific Character Sets
465 // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2 495 // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2
466 enum Encoding 496 enum Encoding
467 { 497 {
918 bool isPlural, 948 bool isPlural,
919 bool isUpperCase); 949 bool isUpperCase);
920 950
921 ORTHANC_PUBLIC 951 ORTHANC_PUBLIC
922 void GetAllDicomTransferSyntaxes(std::set<DicomTransferSyntax>& target); 952 void GetAllDicomTransferSyntaxes(std::set<DicomTransferSyntax>& target);
953
954 ORTHANC_PUBLIC
955 bool IsCompressedTransferSyntax(DicomTransferSyntax syntax);
923 } 956 }