ReadPacket returns available input from the associated buffer or, in case of unbuffered streams or empty buffers, invokes one read operation. If s is buffered then the seek-operation is possibly delayed to the next read or write operation. This can result in seek-errors on read or write. Tell returns the current position. This position can differ from the real position of the underlying implementation in case of buffered streams.
Touch allows to synchronize both positions.
Trunc truncates the length of the stream to cnt . Thus all bytes with addresses greater or equal to cnt are deleted. This call does not modify the current position. Stream buffering allows to undo read operations. At least one successful undo operation is guaranteed.