Skip to content

Instantly share code, notes, and snippets.

@Aaron2550
Last active May 31, 2024 13:54
Show Gist options
  • Save Aaron2550/5701519671253d4c6190bde6706f9f98 to your computer and use it in GitHub Desktop.
Save Aaron2550/5701519671253d4c6190bde6706f9f98 to your computer and use it in GitHub Desktop.
Documentation for the Linear Region File Format

Linear File Format Documentation

This document describes the format of the linear file format created by @xymb-endcrystalme.

File Structure

  • 8 Byte Signature, always 0xc3ff13183cca9d9a
  • 1 Byte Version, only 0x01 is used by linear.py in xymb-endcrystalme/LinearRegionFileFormatTools
  • 4 Byte Newest Timestamp, timestamp of the most recently modified Chunk in this File
  • 1 Byte Compression Level, compression level used for the Chunk Data
  • 1 Byte Chunk Count, how many Chunks are in this File
  • 4 Byte Complete Region Length, compressed Size of the Chunk Data in this File, including Headers
  • 8 Byte Complete Region Hash, unused Hash of the Chunk Data, always 0x0000000000000000
  • Chunk Header * Chunk Count
    • 4 Byte Size, Size of Chunk N
    • 4 Byte Timestamp, Last Modified Timestamp of Chunk N
  • Chunk Data * Chunk Count
  • 8 Byte Signature, always 0xc3ff13183cca9d9a

Benchmarks

  • 3 Runs each, 4624 Region Files, Anvil -> Linear
  • 8 Threads, i9-11900H Engineering Sample
  • Anvil World Size: 20.49 GB

Compression Level 6

  • Linear World Size: 8.99 GB
  • Time: 2m 13.80s

Compression Level 9

  • Linear World Size: 8.68 GB
  • Time: 3m 3.97s

Compression Level 12

  • Linear World Size: 8.49 GB
  • Time: 5m 43.21s

Compression Level 15

  • Linear World Size: 8.14 GB
  • Time: 18m 10.81s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment