Skip to content

Repository files navigation

Steam2.Extractor

Steam2.Extractor restores files and directories from legacy Steam2 packages. Probably the best extractor in terms of performance.

Requirements

  • .NET 10

Local build

Restore locked packages:

dotnet restore Steam2.Extractor.slnx --locked-mode

Build the solution:

dotnet build Steam2.Extractor.slnx --configuration Release --no-restore

Command line

steam2-extract <blob_path> <dat_path> <depot> <version>
  [--blobcrc <crc>]
  [--filter <regex>]
  [--key <32-hex>]
  [--out <directory>]
  [--workers <1-64>]
  [--overwrite]
  [--allow-partial]

<blob_path> and <dat_path> are package directories. They can refer to the same directory.

The filter uses .NET regular expressions with a 2 sec timeout. It applies only to file paths. The extractor creates every manifest directory, even if the filter excludes all related files.

If target files exist, add --overwrite to replace regular files.

If a package chain is incomplete, you can add --allow-partial to extract available files.

Extract files from depot 0, version 13:

steam2-extract ./packages ./packages 0 13 --out ./output

Extract DLL files with 4 workers:

steam2-extract ./packages ./packages 0 13 \
  --filter '\.dll$' \
  --workers 4 \
  --out ./dll-output

Library

Add a reference to Steam2.Extractor. Call the async API:

using Steam2.Extractor;

ExtractionResult result = await Steam2Extractor.ExtractAsync(
    new ExtractionOptions
    {
        BlobDirectory = "./packages",
        DataDirectory = "./packages",
        DepotId = 0,
        Version = 13,
        OutputDirectory = "./output",
        MaxDegreeOfParallelism = 0,
    },
    progress: null,
    cancellationToken);

A zero worker count selects min(Environment.ProcessorCount, 8). Explicit worker counts range from 1 through 64.

License

MIT

Credits

Thanks to NicknineTheEagle and witch for research.

About

A cross-platform extractor for Steam2 depot archives

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages