A clean-room C11 reimplementation of Apple's LZRAVEN compression codec, enabling decoding of OS 27 OTA payloads on any platform without Apple's proprietary library.

Stars

3

7-day growth

No data

Forks

0

Open issues

0

License

NOASSERTION

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

Thoroughly validated against Apple's own decoder via emulation, differential testing, and fuzzing (377M+ executions) with byte-exact results; also includes an encoder and comprehensive documentation of the reversed format.

Who it is for

  • Developers needing cross-platform decode of Apple OS 27 OTA payloads
  • Security researchers analyzing Apple's compression formats
  • Reverse engineers studying proprietary codec implementations
  • Tool builders integrating LZRAVEN support into non-Apple environments

Use cases

  • Unpacking watchOS OTA updates on Linux or Windows
  • Building OTA payload extraction tools without macOS dependency
  • Benchmarking LZRAVEN vs. other compression codecs
  • Encoding data with LZRAVEN for compatibility with Apple's decoder

Strengths

  • Byte-exact validation against Apple's decoder across 182+ real payloads
  • Portable C11, zero dependencies, no dynamic allocation, fixed 35 KB working set
  • Faster decode than xz-6 on typical OS 27 payloads (1.96× with AVX2)
  • Includes both decoder and encoder with competitive compression ratio

Considerations

  • Encoder is not fully optimal (~4% larger ratio than Apple's at default level)
  • Format may change in future Apple OS releases, requiring re-validation
  • Limited maintenance commitment from the author (AI-generated code)

README quick start

liblzraven

Apple's LZRAVEN codec (COMPRESSION_LZRAVEN, algorithm enum 0xD05), reimplemented in C11 — decode OS 27 OTA payloads on any platform.

Foreword (AI use)

A quick foreword from the human owner of the repo:

(yes this is me talking not claude)

every line of this was (quite clearly) written by Claude. I'll be completely honest, I needed to get this working for my own personal tooling, and this was the quickest path to making that happen. I do not intend to maintain this project in any capacity, but it felt worth sharing with others who might need it.

As per the license, do whatever you want with this code :) I hope that people find it useful for dealing with Apple OTA releases (or whatever they choose to compress with this new format) if their chosen platform is not *OS.

It's for this reason that I wanted to make testing a pretty core part of this readme, to make it clear that although this is 100% AI-authored, there was some "effort" to test the generated code. Claude did also write the tests here, but the tests were graded on Apple's libcompression itself, running under emulation. Whenever claude refers to something as being byte-exact here, it's referring to our implementation's output vs libcompression.

Anyways, back to claude :)

What

A clean-room C implementation of LZRAVEN, Apple's compression codec introduced in the OS 27 cycle (COMPRESSION_LZRAVEN).

Apple has published no source and no format specification — only a prose description. As far as I can tell there is no other open implementation: the one existing "lzraven support" in the wild is a cgo call into Apple's closed libcompression, and so is macOS-only.

This library decodes LZRAVEN streams anywhere. C11, no dependencies, no dynamic allocation. The format is documented in SPEC.md.

Why

OS 27 OTA payloads moved from the pbzx container (xz) to pbzm, compressed with LZRAVEN. The cut is clean at the OS 27 boundary — of the OTAs surveyed, 10 of 10 on OS 27 use pbzm, 7 of 7 on OS 26 use pbzx.

Anything that unpacks Apple OTA payloads on a non-Apple platform therefore stops working at OS 27, because libcompression does not exist there. watchOS is the acute case: it ships OTA-only, so there is no IPSW to fall back on.


How it was tested

LZRAVEN's only reference implementation runs solely on Apple platforms, and this was deve

Description

AI-written, conformance-tested C11 implementation of Apple's LZRAVEN codec

Related repositories

Similar projects matched by category, topics, and programming language.

makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958
Blaizzy
Featured
Blaizzy GitHub avatar

nativ

Nativ is a native macOS app that lets you run AI models locally on Apple silicon, offering chat, model management, performance analytics, and an OpenAI/Anthropic-compatible API server.

AI & Machine LearningAI Vision & Audio
985
uzairansaruzi
Featured
uzairansaruzi GitHub avatar

hermex

Hermex is a native SwiftUI iPhone app that lets you control a self-hosted Hermes AI agent directly from your phone, with no subscriptions, tracking, or third-party relay.

AI & Machine LearningLarge Language Models
941