一个干净实现 Apple LZRAVEN 压缩编解码器的 C11 库,可在任何平台上解码 OS 27 OTA 负载,无需 Apple 专有库。

Stars

3

7 天增长

暂无数据

Fork 数

0

开放 Issue

0

开源协议

NOASSERTION

最近更新

2026-07-30

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

通过模拟、差异测试和模糊测试(3.77 亿次执行)与 Apple 自己的解码器进行逐字节验证;还包括编码器和逆向格式的详细文档。

适合谁使用

  • 需要在非 Apple 平台上解码 OS 27 OTA 负载的开发者
  • 分析 Apple 压缩格式的安全研究人员
  • 研究专有编解码器实现的逆向工程师
  • 为非 Apple 环境集成 LZRAVEN 支持的工具构建者

典型使用场景

  • 在 Linux 或 Windows 上解包 watchOS OTA 更新
  • 构建不依赖 macOS 的 OTA 负载提取工具
  • 对比 LZRAVEN 与其他压缩编解码器的性能
  • 用 LZRAVEN 编码数据以兼容 Apple 的解码器

项目优势

  • 与 Apple 解码器在 182+ 真实负载上逐字节一致
  • 可移植 C11,无依赖,无动态分配,固定 35 KB 工作集
  • 在典型 OS 27 负载上解码速度快于 xz-6(AVX2 下 1.96 倍)
  • 包含解码器和编码器,压缩比具有竞争力

使用前须知

  • 编码器尚未完全优化(默认等级下压缩比约大 4%)
  • 格式可能在未来的 Apple OS 版本中更改,需重新验证
  • 作者维护承诺有限(AI 生成代码)

README 快速开始

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

项目描述

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

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

makecindy
精选
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 与机器学习大语言模型
958
Blaizzy
精选
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 与机器学习AI 视觉与语音
985
uzairansaruzi
精选
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 与机器学习大语言模型
941