8#ifndef GRIDFORMAT_COMPRESSION_CONCEPTS_HPP_
9#define GRIDFORMAT_COMPRESSION_CONCEPTS_HPP_
16#include <gridformat/common/serialization.hpp>
19namespace GridFormat::Concepts {
25namespace CompressionDetail {
28 struct IsCompressedBlocks :
public std::false_type {};
29 template<
typename Header>
30 struct IsCompressedBlocks<Compression::CompressedBlocks<Header>> :
public std::true_type {};
33 concept ValidCompressionResult = IsCompressedBlocks<T>::value;
40concept Compressor =
requires(
const T& t, Serialization& s) {
41 { t.compress(s) } -> CompressionDetail::ValidCompressionResult;
48 const Compression::CompressedBlocks<std::size_t>& b) {
49 { t.decompress(s, b) };
55 =
requires {
typename T::ByteType; }
56 and std::invocable<T, std::span<const typename T::ByteType>, std::span<typename T::ByteType>>;
Common classes used in the context of data compression.