MDF Lib 2.2
Interface against MDF 3/4 files
Loading...
Searching...
No Matches
zlibutil.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Ingemar Hedvall
3 * SPDX-License-Identifier: MIT
4 */
9#pragma once
10#include <cstdint>
11#include <cstdio>
12#include <string>
13#include <vector>
14
15namespace mdf {
16
17using ByteArray = std::vector<uint8_t>;
18
26bool Deflate(std::FILE* in, std::FILE* out);
27
41bool Deflate(const ByteArray& buf_in,
42 ByteArray& buf_out);
43
55bool Deflate(const std::string& filename,
56 ByteArray& buf_out);
57
58bool Inflate(std::FILE* in, std::FILE* out);
59bool Inflate(std::FILE* in, std::FILE* out,
60 uint64_t nof_bytes);
61bool Inflate(const ByteArray& in,
62 ByteArray& out);
63bool Inflate(const ByteArray& in,
64 std::FILE* out);
65
67 size_t record_size);
69 size_t record_size);
70
71} // namespace mdf
Main namespace for the MDF library.
Definition canmessage.h:17
bool Inflate(std::FILE *in, std::FILE *out)
Decompress file to file.
std::vector< uint8_t > ByteArray
Defines a dynamic byte array.
Definition zlibutil.h:17
void InvTranspose(ByteArray &data, size_t record_size)
Invert transpose of an array.
void Transpose(ByteArray &data, size_t record_size)
Transpose of an array.
bool Deflate(std::FILE *in, std::FILE *out)
Compress file to file.