Update 'README.md'

thought of the right way to make the header optional
This commit is contained in:
sebboh 2019-01-11 17:52:08 -05:00
parent d624e6ba09
commit 631d7033fc
1 changed files with 5 additions and 5 deletions

View File

@ -4,11 +4,11 @@ A format for sending IRC bitmaps inline.
## Format
The format string shall be (in Python syntax) `r'<i([^-]+)-([^-]*)-(.*)'`.
The format string shall be (in Python syntax) `r'<i([^-]+)-([^-]*-)(.*)'`.
The first capture group shall be a format. The currently recognized formats are `gb`, `r16`, and `r85`, though any format can be used. A program SHOULD gracefully report and exit on an unknown or unsupported format. The identifier of a format may not include a hyphen (dash).
The second capture group (may be empty) shall be known as the header and its syntax shall be defined by the format.
The second capture group (optional) shall be known as the header and its syntax shall be defined by the format, but if present it MUST contain exactly one hypen and it must be the last character in the header.
The third capture group contains the image data, shall be known as the payload, and is defined by the format.
@ -22,7 +22,7 @@ While there is no theoretical limit to the size of the image you can send, you a
For an explanation of the format, see [here](http://www.huderlem.com/demos/gameboy2bpp.html).
The header has this syntax: `r'(\d+).(\d+)'`. The first and second capture groups specify the width and height in 8x8 tiles.
The header has this syntax: `r'(\d+).(\d+)-'`. The first and second capture groups specify the width and height in 8x8 tiles.
The payload is a hexadecimal representation of the image data. It has this syntax: `r'([0-9A-Fa-f]+)'`.
@ -32,7 +32,7 @@ Results in:
### `r16` - Raw arbitrary bitmaps, hexadecimal-encoded
The header has this syntax: `r'(\d+).(\d+).(\d+)'`. The first and second capture groups specify the width and height of the image and the third group specifies the bitdepth.
The header has this syntax: `r'(\d+).(\d+).(\d+)-'`. The first and second capture groups specify the width and height of the image and the third group specifies the bitdepth.
The payload is a hexadecimal representation of the image data. It has this syntax: `r'([0-9A-Fa-f]+)'`.
@ -44,7 +44,7 @@ Results in:
### `ra85` - Raw arbitrary bitmaps, (Adobe) ascii85-encoded
The header has this syntax: `r'(\d+).(\d+).(\d+)'`. The first and second capture groups specify the width and height of the image and the third group specifies the bitdepth.
The header has this syntax: `r'(\d+).(\d+).(\d+)-'`. The first and second capture groups specify the width and height of the image and the third group specifies the bitdepth.
The payload is an (Adobe) ascii85-encoded representation of the image data. It has this syntax: `r'(<~[!-uz]+~>)'`.