SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
LZMA.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <optional>
5#include <span>
6#include <vector>
7
9#include <sourcepp/Math.h>
10
12
14
15[[nodiscard]] std::optional<std::vector<std::byte>> compressValveLZMA(std::span<const std::byte> data, uint8_t compressLevel = 6);
16
17[[nodiscard]] std::optional<std::vector<std::byte>> decompressValveLZMA(std::span<const std::byte> data);
18
19} // namespace sourcepp::compression
std::optional< std::vector< std::byte > > compressValveLZMA(std::span< const std::byte > data, uint8_t compressLevel=6)
Definition: LZMA.cpp:8
constexpr auto VALVE_LZMA_SIGNATURE
Definition: LZMA.h:13
std::optional< std::vector< std::byte > > decompressValveLZMA(std::span< const std::byte > data)
Definition: LZMA.cpp:51
consteval uint32_t makeFourCC(const char fourCC[4])
Creates a FourCC identifier from a string of 4 characters.
Definition: Binary.h:18