hid.im

About: The Bookmarklet, Hidim Format Return Home

Hid.im image format

A hidim is a torrent that is embedded inside of a 24-bit png. The data portion of a hidim does not need to fill the image.

Torrent data is read upward and to the right.

The torrent is broken up into 3-byte segments, and each segment represents red, green, and blue channels in a pixel.

Each hidim is identified by the hidim key:

[104, 105, 100, 105, 109, 32, 105, 115, 32, 116, 111, 114, 114, 101, 110, 116, 115, 33]

This byte array identifies the image as a hidim and marks the start of hidim data. The hidim reader starts at the hidim key, reads the metadata to determine the column height and data length, then reads column-by-column to the right until the data length has been reached.

Metadata format

Metadata is similar to bencoding and has the following attributes:

  1. line length -- bencoded integer
  2. filename -- bencoded string
  3. sha1 hash of .torrent file -- bencoded string
  4. length of the following data -- bencoded integer
  5. raw data of the torrent

Example metadata:

i30e14:ubuntu.torrent40:f572d396fae9206628714fb2ce00f72e94f2258fi12688ed8:anno...

Metadata is stacked together without separators.