Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IDataCompressor.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/* IDataCompressor.h (C) 2000-2021 */
9/* */
10/* Interface allowing data compression/decompression. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_IDATACOMPRESSOR_H
13#define ARCANE_UTILS_IDATACOMPRESSOR_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
31class ARCANE_UTILS_EXPORT IDataCompressor
32{
33 public:
34
35 virtual ~IDataCompressor() = default;
36
37 public:
38
39 virtual void build() = 0;
40
41 public:
42
44 virtual String name() const = 0;
45
57 virtual Int64 minCompressSize() const = 0;
58
64 virtual void compress(Span<const std::byte> values, Array<std::byte>& compressed_values) = 0;
65
73 virtual void decompress(Span<const std::byte> compressed_values, Span<std::byte> values) = 0;
74};
75
76/*---------------------------------------------------------------------------*/
77/*---------------------------------------------------------------------------*/
78
79} // End namespace Arcane
80
81/*---------------------------------------------------------------------------*/
82/*---------------------------------------------------------------------------*/
83
84#endif
Declarations of types used in Arcane.
Base class for 1D data vectors.
Interface of a service for compressing/decompressing data.
virtual String name() const =0
Algorithm name.
virtual void decompress(Span< const std::byte > compressed_values, Span< std::byte > values)=0
Decompresses the data compressed_values and stores it in values.
virtual void compress(Span< const std::byte > values, Array< std::byte > &compressed_values)=0
Compresses the data values and stores it in compressed_values.
virtual Int64 minCompressSize() const =0
Minimum array size below which compression is not useful.
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 --
std::int64_t Int64
Signed integer type of 64 bits.