Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosaure committed Apr 20, 2018
1 parent 4a62089 commit c37c66b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
Duff
====
Duff – libXdiff implementation in OCaml
---------------------------------------

Duff is a little library to implement
[libXdiff](http://www.xmailserver.org/xdiff-lib.html) in OCaml. This library is
a part of the [ocaml-git](https://github.com/mirage/ocaml-git) project. This
code is a translation of `diff-delta.c` available on the git project in OCaml.
So, it respects some git's constraints unlike libXdiff.

Examples
========
## Examples

This library let the user to calculate an `Index.t` from a source (a hash-table)
which can be computed with a blob. Then, from `Index.t` (which represents your
Expand All @@ -26,8 +25,7 @@ and `len`, and `Insert` *opcode* which contains entirely slice of your blob.
Finally, to procude a PACK file in git or ocaml-git, we use this algorithm and
this representation to optimize representation of your blobs (cf. `git gc`).

Binary
------
### Binary

You can see an example of `duff` in `bin` directory. It's an executable to
represent a _thin_ representation of your file. Then, you can reconstruct it
Expand All @@ -46,8 +44,7 @@ $ echo $?
The internal format used is close to what `git` does internally (without `zlib`
layer). However, it does not correspond to an _official_ format.

Limitations
===========
## Limitations

Because this project is used by
[ocaml-git](https://github.com/mirage/ocaml-git), we have some limitations:
Expand All @@ -63,8 +60,7 @@ these constraints is outside this library.
From this limitation, `Copy` *opcode* have an offset between 0x0 and 0xFFFFFFE
and `off + len` is lower than 0xFFFFFFFE.

Fuzzer
======
## Fuzzer

We provide a fuzzer to randomly test this library. Currently (4/9/2018),
`afl-fuzz` did not find any bugs and it computed 67.7k cycles (117 paths).

0 comments on commit c37c66b

Please sign in to comment.