The Repetition Library contains a single pattern, RepetitionObject.
This pattern can be used to pass serialized objects around, eg. through sockets.
It has attributes that make it simple to pack different simple data into a single repetition.
It has the following attributes:
initialRange: Virtual which specifies the initial size of the repetition.
size: The size of the used space.
pos: The next position to be used for get or put.
get: Reads a long from the repetition a the current position.
getLong: Like get, bug swapping to big endian on little endian machines.
Peek: Like get but does not update position.
PeekLong: Like getLong but does not update position.
put: Puts a integer and updates position.
putLong: Does not update position.
cheapPut: Like put, but the user must ensure that there is room enough in the repetition.
cheapPutLong: Like cheapput.
makeSpace: Expands the repetition.
checkSize: Updates the size to be at least the position - 1.
getText: Reads a text from the repetition.
putText: Writes a text to the repetition. Also expands if neccessary.
reset: Resets the repetition. Sets pos to the start, but does not clear or frees the space.
init: Must be called initially.
checkGet: Checks that the position is legal, ie. less that size.
checkGetText: Checks that a text can be legally read.