[Oberon] FPGA - Pictures - RLE scheme

Tomas Kral thomas.kral at email.cz
Mon Oct 9 10:51:49 CEST 2017


I am trying to write `RLE' compression scheme in `EBNF'. These are
facts I have learnt.

- RLE compression is used on bytes, sometimes called RLE1, generally
  RLE compression may also work with shorts and longs as well (RLE2,
  RLE4), possibly also in vertical direction
- compression occurs horizontally on bitmap lines
- each run begins with a run length byte
- run lenght is maximum of 127 bytes
- there are two types of runs, equal byte run `EBR', non-equal byte
  run `NEBR'
- run len byte counts either from 0,1,2..., or from
  255(-1),254(-2),..., for `EBR', `NEBR' respectively
- each run ends when a maximum count of 127 bytes, or when a bitmap line
  end are reached, or when the type of run has changed

This should be simple, but my wording seems clumsy and complicated, I
wonder if it could be put in `EBNF' at all?

Tomas Kral <thomas.kral at email.cz>

More information about the Oberon mailing list