Rudimentary encoding and decoding