Aliphaticus.KrakenDecoder
0.1.0
dotnet add package Aliphaticus.KrakenDecoder --version 0.1.0
NuGet\Install-Package Aliphaticus.KrakenDecoder -Version 0.1.0
<PackageReference Include="Aliphaticus.KrakenDecoder" Version="0.1.0" />
<PackageVersion Include="Aliphaticus.KrakenDecoder" Version="0.1.0" />
<PackageReference Include="Aliphaticus.KrakenDecoder" />
paket add Aliphaticus.KrakenDecoder --version 0.1.0
#r "nuget: Aliphaticus.KrakenDecoder, 0.1.0"
#:package Aliphaticus.KrakenDecoder@0.1.0
#addin nuget:?package=Aliphaticus.KrakenDecoder&version=0.1.0
#tool nuget:?package=Aliphaticus.KrakenDecoder&version=0.1.0
Aliphaticus.KrakenDecoder
Aliphaticus.KrakenDecoder is an MIT-licensed, managed, dependency-free
decoder for Oodle Kraken payloads. It is intended for tools that need to read
FromSoftware DCX_KRAK files without distributing or loading oo2core.
The package decodes the payload after the DCX header; it does not replace a general DCX parser or write DCX files.
<PackageReference Include="Aliphaticus.KrakenDecoder" Version="0.1.0" />
using Aliphaticus.KrakenDecoder;
byte[] dcx = File.ReadAllBytes("input.dcx");
KrakenDcxInfo header = KrakenDcxHeader.Parse(dcx);
var decoder = new ManagedKrakenDecoder();
byte[] decompressed = decoder.Decompress(
dcx.AsSpan(KrakenDcxHeader.PayloadOffset, checked((int)header.CompressedSize)),
header.UncompressedSize);
Releasing
To produce NuGet artifacts run the following
dotnet pack KrakenDecoder.csproj --configuration Release --output ./artifacts
Supported scope
- Oodle decoder type 6 (Kraken) payloads, including Elden Ring's independently
reset
0x40000-byte seek chunks. - Strict validation of decoded size, consumed input, and malformed payloads.
The package deliberately does not support compression, general Oodle decoding, or non-Kraken codecs. In particular, LZHLW, Mermaid, Leviathan, BitKnit, LZNA, and any other decoder type are rejected. Callers that scan heterogeneous game archives should catch the error, log the path and codec, and skip unsupported files according to their own policy.
EldenRing DCX contract
SoulsFormats.DCX.DecompressDCXKRAK consumes this fixed big-endian layout:
| Field | Offset | Value |
|---|---|---|
| DCX signature | 0x00 |
DCX\0 |
| uncompressed size | 0x1C |
u32 |
| compressed size | 0x20 |
u32 |
| compressor | 0x28 |
KRAK |
| payload | 0x4C |
exactly compressed size bytes |
The package's KrakenDcxHeader validates those boundaries before handing the
payload to the decoder. It is deliberately not a replacement for
SoulsFormats' DCX parser.
Corpus verification
Do not add game assets to this repository or NuGet package. Local/CI corpus
tests obtain paths from KRAKEN_CORPUS_PATH and hashes/sizes from a separate,
non-versioned manifest. A skipped corpus
test is not compatibility evidence.
Corpus test protocol
No game asset belongs in this repository, its test output, or its NuGet package.
Keep a local, ignored manifest next to an externally supplied corpus. Set
KRAKEN_CORPUS_PATH to the corpus root and KRAKEN_CORPUS_MANIFEST to the
manifest file, then invoke the test only on a machine that owns the files. The
test is dynamically skipped if either variable is absent. You may instead copy
.env.template to the ignored repository-root .env; the test imports those
two values only when the corresponding process environment variable is unset.
For several corpora with different roots, use one or more
KRAKEN_CORPUS_SUITE_nn=ROOT|MANIFEST values instead.
The manifest may be a single entry, an array of entries, or an object with a
files array (case-insensitive). It must list at least one multi-block
DCX_KRAK file; each entry contains:
{
"path": "map/mapstudio/example.msb.dcx",
"uncompressedSize": 1234567,
"sha256": "lowercase SHA-256 of the independently decoded payload"
}
fileName may be used instead of path when KRAKEN_CORPUS_PATH already
points at the directory containing the files. Optional compressedSize and
containerSize values validate the DCX header and complete container length.
Uppercase SHA-256 is accepted for compatibility with native Convert.ToHexString
output, although lowercase remains preferred. Elden Ring files may include up
to 15 trailing zero alignment bytes after the declared compressed payload; the
decoder receives only the declared compressed bytes.
The test must parse the DCX header, require uncompressedSize > 0x40000, decode
the payload using the managed library with no native Oodle library available,
and compare the complete SHA-256. Re-run it after truncating one byte, adding
one byte, and changing each declared size; all four must fail.
Scope and licensing
The implementation is a clean C# port informed by MIT-licensed oozextract v0.5.5. See NOTICE for attribution and provenance.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 162 | 8/22/2026 |
Initial public release. Adds managed decoding for Oodle Kraken decoder type 6 payloads; compression and non-Kraken codecs are intentionally unsupported.