https://github.com/ross-spencer/eyeglass
Sample file format for teaching the principles file format development in the digital preservation community
https://github.com/ross-spencer/eyeglass
code4lib digipres file-formats kaitai pedagogy pronom
Last synced: 16 days ago
JSON representation
Sample file format for teaching the principles file format development in the digital preservation community
- Host: GitHub
- URL: https://github.com/ross-spencer/eyeglass
- Owner: ross-spencer
- Created: 2012-11-07T03:45:08.000Z (over 13 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T14:44:43.000Z (over 1 year ago)
- Last Synced: 2025-12-25T19:37:41.453Z (6 months ago)
- Topics: code4lib, digipres, file-formats, kaitai, pedagogy, pronom
- Language: Python
- Homepage: https://exponentialdecay.co.uk/blog/genesis-of-a-file-format/
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eyeglass
Sample 'file format' specification and applications for understanding issues in
digital preservation. The format stores the information required for an eyeglass
prescription for a single patient.
## Specification
Eyeglass Format Specification 1.0
---
Magic number - 14 bytes - String
Version - 1 bytes - Unsigned Char
Big-endian - 1 byte - Bool
Date/time - 19 bytes - String #YYYY-MM-DDTHH:MM:SS
Expansion room - 88 bytes - Undefined
Sphere - 8 bytes - R: Float L: Float
Cylinder - 8 bytes - R: Float L: Float
Axis - 8 bytes - R: Integer L: Integer
Prism - 8 bytes - R: Float L: Float
Base - 8 bytes - R: Float L: Float
Distance acuity - 8 bytes - R: Float L: Float
Near acuity - 8 bytes - R: Integer L: Integer
Purpose - 140 bytes - String
Observation - 255 bytes - String
Next checkup - 4 bytes - Float
End of file - 4 bytes - String
The *‘magic number’* identifying the file format will be as follows:
'\xBB\x0D\x0A\x65\x79\x65\x67\x6C\x61\x73\x73\x1A\x0A\xAB'
The *‘end of file’* sequence terminating the stream will be as follows:
'\xBB\x65\x6f\x66'
## Further reading
* [exponentialdecay.co.uk/blog/genesis-of-a-file-format][expo-1].
* [exponentialdecay.co.uk/blog/shattering-the-eyeglass][expo-2].
[expo-1]: http://exponentialdecay.co.uk/blog/genesis-of-a-file-format/
[expo-2]: https://exponentialdecay.co.uk/blog/shattering-the-eyeglass/