Offset

object Offset

bsdiff encodes offsets (represented by the C off_t type) as 64-bit chunks. In this implementation only 32-bit signed integers are supported, but the additional encoding steps are left to illustrate the process (which, in Java, would encode/decode a long primitive data type).

class Object
trait Matchable
class Any
Offset.type

Value members

Concrete methods

def readBlock(in: InputStream): Block
def readHeader(in: InputStream): Header
def readOffset(in: InputStream): Int

Reads a bsdiff-encoded offset (based on the C off_t type) from an [[InputStream]].

Reads a bsdiff-encoded offset (based on the C off_t type) from an [[InputStream]].

def writeBlock(b: Block, out: OutputStream): Unit
def writeHeader(h: Header, out: OutputStream): Unit
def writeOffset(value: Int, out: OutputStream): Unit

Writes a bsdiff-encoded offset to an [[OutputStream]].

Writes a bsdiff-encoded offset to an [[OutputStream]].

Concrete fields

val OFFSET_SIZE: Int

Size of a bsdiff-encoded offset, in bytes.

Size of a bsdiff-encoded offset, in bytes.