Files
Giacomo Vercesi dfb9a36bb2 pypeline: implement compression
Implement compression of objects before they are saved into the storage
provider. Each container type can specify which algorithm to use
(currently `none` or `zstd`) and the compression level.
2026-06-17 10:06:35 +02:00

40 lines
1.3 KiB
C++

#pragma once
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include "revng/PipeboxCommon/RawContainer.h"
namespace revng::pypeline {
class PTMLCBytesContainer : public BytesContainer {
public:
static constexpr llvm::StringRef Name = "PTMLCBytesContainer";
static constexpr llvm::StringRef MimeType = "text/x.c+ptml";
static constexpr llvm::StringRef Compression = "zstd;level=2";
};
class PTMLCFunctionBytesContainer : public FunctionToBytesContainer {
public:
static constexpr llvm::StringRef Name = "PTMLCFunctionBytesContainer";
static constexpr llvm::StringRef MimeType = "text/x.c+ptml";
static constexpr llvm::StringRef Compression = "zstd;level=1";
};
class PTMLCTypeBytesContainer : public TypeDefinitionToBytesContainer {
public:
static constexpr llvm::StringRef Name = "PTMLCTypeBytesContainer";
static constexpr llvm::StringRef MimeType = "text/x.c+ptml";
static constexpr llvm::StringRef Compression = "zstd;level=-1";
};
class RecompilableArchiveContainer : public BytesContainer {
public:
static constexpr llvm::StringRef Name = "RecompilableArchiveContainer";
static constexpr llvm::StringRef MimeType = "application/x-object";
static constexpr llvm::StringRef Compression = "none";
};
} // namespace revng::pypeline