Files
Giacomo Vercesi 4a2cd259e3 Introduce GzipTarFile
Add the GzipTarFileWriter and GzipTarReader classes that allow reading a
slightly custom `.tar.gz`.
2023-09-06 15:23:43 +02:00

27 lines
839 B
C

#pragma once
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/raw_ostream.h"
void gzipCompress(llvm::raw_ostream &OS,
llvm::ArrayRef<uint8_t> Buffer,
int CompressionLevel = 3);
inline void gzipCompress(llvm::raw_ostream &OS, llvm::ArrayRef<char> Buffer) {
return gzipCompress(OS,
{ reinterpret_cast<const uint8_t *>(Buffer.data()),
Buffer.size() });
}
void gzipDecompress(llvm::raw_ostream &OS, llvm::ArrayRef<uint8_t> Buffer);
inline void gzipDecompress(llvm::raw_ostream &OS, llvm::ArrayRef<char> Buffer) {
return gzipDecompress(OS,
{ reinterpret_cast<const uint8_t *>(Buffer.data()),
Buffer.size() });
}