mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 16:55:11 +01:00
std/lzma: add LZMA2 support
This commit is contained in:
1 parent
cc01be3b17
commit
41a83f2e29
4 files changed
+535
-161
No files matched your search
@@ -0,0 +1,30 @@
|
||||
// Copyright 2023 The Wuffs Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
|
||||
// --------
|
||||
|
||||
// Quirks are discussed in (/doc/note/quirks.md).
|
||||
//
|
||||
// The base38 encoding of "lzma" is 0x141638. Left shifting by 10 gives
|
||||
// 0x5058_E000.
|
||||
pri const QUIRKS_BASE : base.u32 = 0x5058_E000
|
||||
|
||||
// --------
|
||||
|
||||
// When this quirk is set, a positive value indicates an extension to the LZMA
|
||||
// format. Zero means to use the default LZMA format.
|
||||
//
|
||||
// When positive, the low byte of the u64 value indicates the extension.
|
||||
// Currently, the only valid extension is 0x02, indicating LZMA2.
|
||||
//
|
||||
// For LZMA2, the high 7 bytes (shifted right by 8) must be less than or equal
|
||||
// to 40 and indicates the dictionary size. See section "5.3.1. LZMA2" of
|
||||
// https://tukaani.org/xz/xz-file-format.txt
|
||||
pub const QUIRK_FORMAT_EXTENSION : base.u32 = 0x5058_E000 | 0x00
|
||||
Reference in new issue
Block a user