Archive formats

cpio newc record builder

Build one regular-file newc record with a UTF-8 filename and binary payload.

Your inputs

Start with an example

Your inputs stay in your browser.

Your result

Example result

How it works

Write magic 070701 and thirteen eight-character hex fields. Append the NUL-terminated filename, align data to four bytes and pad the record end.

Filename a makes 110 + 2 = 112 bytes before data. Payload 41 42 plus two trailing zeros gives 116 bytes.

Limits

A single regular-file record with link count 1 and device IDs 0. UTF-8 filenames including NUL must fit 4096 bytes. No trailer, compression, links or special files. The hex download must be converted to binary before archive use.