Canonical repo for Dong Web (dong.vielle.dev)
1# Dong Files 2 3Dong files are image files that play audio when opened. The mime type is `application/prs.vielle.dong` 4 5## Creating a `.dong` file 6 7A dong file is structured as follows: 8 9```txt 10d0<version> 11<image-mime><image-data> 12<audio-mime><audio-data> 13<image-data> 14<audio-data> 15``` 16 17### Version 18 19Version is an 8 bit number that indicates the version of the dong file. This file documents version 2 of the dong file format. This is prefixed with the hex value d0 to indicate that this is a dong file. The first 16 bits of a version 2 `.dong` file should be `11010000 00000010`. If this does not match, it is either a different file format or version. 20 21### Image Metadata 22 23Image metadata starts with a mimetype. The mimetype is 255 bytes long, followed by a 00 byte. If the mimetype is shorter than 255 characters, the remaining bytes are filled with 00 bytes. 24The metadata is then followed with an image length, which must be 32 bits long. This represents the number of bytes in the image data. 25 26### Audio Metadata 27 28See: Image metadata 29 30### Image Data 31 32This is a binary blob taking up the number of bytes allocated in image-length. 33 34### Audio Data 35 36This is a binary blob taking up the number of bytes allocated in audio-length.