Skip to content

Data Preservation

lrg4you edited this page Aug 7, 2026 · 1 revision

Data Preservation

LRGEX Compress is built on a simple promise: what goes in comes out identical. When you compress a folder and extract it later, everything is preserved — not just the file contents, but the metadata that makes your files behave correctly in Windows.


What is preserved (verified lossless)

Every one of these round-trips identically through a compress → extract cycle:

File contents

Byte-for-byte identical. Verified via SHA256 hashing on thousands of files. Your data is never corrupted or altered.

LastWriteTime (mtime)

The "Date modified" you see in Explorer. This is the one most users notice when it's broken — if an archiver doesn't preserve it, every extracted file shows today's date, which breaks:

  • Sort-by-date in Explorer
  • Build systems (Make, Cargo, MSBuild) — they rebuild everything because files look "newer"
  • Incremental backup tools — they re-back-up everything
  • Git and sync tools — they think every file changed

LRGEX preserves the original modification time on every file and folder.

CreationTime (ctime)

The "Date created" in Explorer. Preserved on all files.

Windows file attributes

Attribute Preserved? Example
Hidden A hidden file extracts as hidden
Read-only A read-only file extracts as read-only
System System files keep their system flag
Archive Archive bit preserved

Symbolic links / junctions

Symlinks and junctions are recreated as symlinks on extraction. Note: Windows requires Administrator or Developer Mode to create symlinks. If you're not elevated, LRGEX asks once: "This archive contains symbolic links. To recreate them exactly, LRGEX needs administrator permission. Allow?"

  • Yes → LRGEX re-launches the extraction with admin rights and recreates every link.
  • No → Links are skipped gracefully (extraction continues, never aborts).

Directory timestamps

Folders keep their original modification time. This is done in a final pass after all files are written — because writing a file into a folder updates the folder's mtime, we have to set folder timestamps last.

Empty folders

Empty directories are preserved. Some archivers silently drop them; LRGEX keeps your exact folder structure.

Unicode / non-ASCII filenames

Filenames with non-ASCII characters (Arabic, Japanese, accented Latin, etc.) are preserved exactly.

Deeply nested paths

Folder structures many levels deep are preserved without issue.


What is NOT preserved (known limitations)

Feature Status Why
Sub-second timestamp precision ❌ Not preserved Timestamps are stored at whole-second precision (e.g., 10:30:00, not 10:30:00.123). This matches how Windows itself handles most timestamps. Nobody needs sub-second precision for backups or file sharing.
NTFS alternate data streams (ADS) ❌ Not supported ADS is an obscure NTFS feature from the 1990s that almost no normal file uses. Not planned.

If either of these matters to you, LRGEX Compress is not the right tool for that specific use case. For everyone else — your data is preserved exactly.


How it works (technical)

The .zgx format is tar.zst (a tar stream compressed with zstd). Metadata is stored in two places:

  1. mtime — in the standard tar header field (seconds since epoch)
  2. ctime + Windows attributes — in a packed binary sidecar blob (.lrgex/meta.bin) at the front of the archive. This is a path-keyed map of (creation_time, file_attributes) records.

On extraction, the sidecar is parsed first into a lookup table. As each file is written, its metadata is restored via SetFileInformationByHandle — a single Windows syscall on the open file handle that sets mtime, ctime, and attributes in one call. This is both correct (no re-opening the file) and fast.

For .zip and .rar extraction, LRGEX restores whatever metadata those formats carry (zip: mtime + attributes + symlinks; rar: restored by the official UnRAR library).

Clone this wiki locally