Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IDeflateService.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IDeflateService.h (C) 2000-2025 */
9/* */
10/* Interface of a service allowing compression/decompression of data. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IDEFLATESERVICE_H
13#define ARCANE_CORE_IDEFLATESERVICE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28// Minimum size (in bytes) for an array to be compressed.
29// Below this size, it is not compressed.
30// If this size changes, the corresponding size must be changed
31// in the VariableComparer in C#.
32static const Integer DEFLATE_MIN_SIZE = 512;
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
42class ARCANE_CORE_EXPORT IDeflateService
43{
44 public:
45
46 virtual ~IDeflateService() = default;
47
48 public:
49
50 virtual void build() = 0;
51
52 public:
53
59 ARCANE_DEPRECATED_REASON("Y2023: This interface is deprecated. Use IDataCompressor instead")
60 virtual void compress(ByteConstArrayView values, ByteArray& compressed_values) = 0;
61
67 ARCANE_DEPRECATED_REASON("Y2023: This interface is deprecated. Use IDataCompressor instead")
68 virtual void compress(Span<const Byte> values, ByteArray& compressed_values);
69
77 ARCANE_DEPRECATED_REASON("Y2023: This interface is deprecated. Use IDataCompressor instead")
78 virtual void decompress(ByteConstArrayView compressed_values, ByteArrayView values) = 0;
79
87 ARCANE_DEPRECATED_REASON("Y2023: This interface is deprecated. Use IDataCompressor instead")
88 virtual void decompress(Span<const Byte> compressed_values, Span<Byte> values);
89};
90
91/*---------------------------------------------------------------------------*/
92/*---------------------------------------------------------------------------*/
93
94} // End namespace Arcane
95
96/*---------------------------------------------------------------------------*/
97/*---------------------------------------------------------------------------*/
98
99#endif
Declarations of Arcane's general types.
Interface of a service allowing compression/decompression of data.
virtual void compress(ByteConstArrayView values, ByteArray &compressed_values)=0
Compresses the data values and stores it in compressed_values.
virtual void decompress(ByteConstArrayView compressed_values, ByteArrayView values)=0
Decompresses the data compressed_values and stores it in values.
View of an array of elements of type T.
Definition Span.h:635
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ArrayView< Byte > ByteArrayView
C equivalent of a 1D array of characters.
Definition UtilsTypes.h:447
Int32 Integer
Type representing an integer.
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
Definition UtilsTypes.h:121
ConstArrayView< Byte > ByteConstArrayView
C equivalent of a 1D array of characters.
Definition UtilsTypes.h:476
unsigned char Byte
Type of a byte.
Definition BaseTypes.h:43