Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type C2 ¶
type C2 struct {
// contains filtered or unexported fields
}
C2 is a circular buffer intended to allow you to write a block of data of up to 'blocksize', and retrieve the data evicted by that operation, without allocating any extra slice storage
This requires that it keep at least blocksize*2 data around. In fact, it doubles that again in order to guarantee that both of these bits of information can always be obtained in a single contiguous block of memory.
Other than the cost of the extra memory (4xblocksize), this means that it requires 2 writes for every byte stored.
func MakeC2Buffer ¶
Click to show internal directories.
Click to hide internal directories.