Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
regular committed Jul 7, 2017
1 parent fbd9341 commit d076bf7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ var log = OffsetLog('/data/log', {
codec: {encode, decode} // defaults to a json codec
flags: 'r', // default is 'a+',
cache: {set, get} // default is require('hashlru')(1024)
offsetCodec: { // default is require('./frame/offset-codecs')[32]
byteWidth, // with the default offset-codec, the file can have
encode, // a size of 4GB max.
decodeAsync
}
})
```

Expand Down Expand Up @@ -63,7 +68,7 @@ of the start of a record is the primary key (`offset`).
offset-><data.length (UInt32BE)>
<data ...>
<data.length (UInt32BE)>
<file_length (UInt32BE)>
<file_length (UInt32BE or Uint48BE or Uint53BE)>
```
by writing the length of the data both before and after each record
it becomes possible to scan forward and backward (like a doubly linked list)
Expand Down

0 comments on commit d076bf7

Please sign in to comment.