c2pa-warc 0.1.0

C2PA manifest embedding for WARC web archive files (ISO 28500)
Documentation
  • Coverage
  • 8.33%
    1 out of 12 items documented0 out of 0 items with examples
  • Size
  • Source code size: 13.46 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 405.18 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • writerslogic/c2pa-warc
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dcondrey

Overview

Stores and retrieves C2PA Manifest Stores in WARC 1.1 files (ISO 28500). The manifest is stored as a WARC resource record with Content-Type: application/c2pa, appended at the end of the file.

WARC is used by national libraries, legal deposit systems, and digital preservation institutions to archive web content. This crate enables content provenance for archived web resources.

Zero dependencies.

Quick Start

[dependencies]
c2pa-warc = "0.1"

Append a manifest

use c2pa_warc::append_manifest;

let warc_data: &[u8] = /* existing WARC file bytes */;
let manifest: &[u8] = /* C2PA manifest store bytes */;
let signed = append_manifest(warc_data, manifest, "urn:uuid:12345678-1234-1234-1234-123456789012").unwrap();

Read a manifest

use c2pa_warc::read_manifest;

let manifest = read_manifest(&warc_data).unwrap();

Multiple manifests

When a WARC file contains multiple C2PA manifest records (e.g., after concatenation), the last record is used as the active manifest. Pre-existing manifest records are preserved, and their hashes become valid again if the file is split back into its original constituents.

Design

  • Manifest stored as a WARC resource record
  • Content hashing via collection data hash over entire WARC records (headers + body)
  • Supports per-record gzip compression (hashes compressed bytes)
  • Append-only; no two-pass workflow required
  • Multiple manifests allowed; last record is active

Related Crates

Crate Description
c2pa-structured-text Structured text embedding via ASCII armour delimiters
c2pa-vtt WebVTT subtitle embedding
c2pa-text-binding Soft binding and content fingerprinting for text assets
c2pa-rs Official C2PA SDK

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.

Built by WritersLogic