Vector BLF: LogContainer.h Source File

Vector BLF

Loading...
Searching...
No Matches
LogContainer.h
1// SPDX-FileCopyrightText: 2013-2021 Tobias Lorenz <tobias.lorenz@gmx.net>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include <Vector/BLF/platform.h>
8
9#include <vector>
10
11#include <Vector/BLF/AbstractFile.h>
12#include <Vector/BLF/ObjectHeaderBase.h>
13
14#include <Vector/BLF/vector_blf_export.h>
15
16namespace Vector {
17namespace BLF {
18
22 struct VECTOR_BLF_EXPORT LogContainer final : ObjectHeaderBase {
23 LogContainer();
24
25 void read(AbstractFile & is) override;
26 void write(AbstractFile & os) override;
27 uint32_t calculateObjectSize() const override;
28
35 uint16_t compressionMethod {};
36
40 uint16_t reservedLogContainer1 {};
41
45 uint32_t reservedLogContainer2 {};
46
50 uint32_t uncompressedFileSize {};
51
53 uint32_t reservedLogContainer3 {}; // @todo what is this? 0x0215, 0x9a, 0, 0x0c...
54
56 std::vector<uint8_t> compressedFile {};
57
58 /* following data is calculated */
59
61 std::vector<uint8_t> uncompressedFile {};
62
64 uint32_t compressedFileSize {};
65
67 std::streampos filePosition {};
68
76 uint16_t internalHeaderSize() const;
77
81 virtual void uncompress();
82
89 virtual void compress(const uint16_t compressionMethod, const int compressionLevel);
90};
91
92}
93}
Vector::BLF::AbstractFile
Definition: AbstractFile.h:19
Vector::BLF::LogContainer
LOG_CONTAINER.
Definition: LogContainer.h:22
Vector::BLF::ObjectHeaderBase
Base object header type definition.
Definition: ObjectHeaderBase.h:164