package patdiff

  1. Overview
  2. Docs
File Diff using the Patience Diff algorithm

Install

Dune Dependency

Authors

Maintainers

Sources

patdiff-v0.14.0.tar.gz
sha256=fbe06078bdb58f3e0c165998ecb82de6983a173c62f0f9f3ae4e914e645204e1
md5=12319e1918cf37f2800fd5aef272b398

doc/src/patdiff.kernel/is_binary.ml.html

Source file is_binary.ml

1
2
3
4
5
6
7
8
9
open! Core_kernel
open! Import

(* The choice of 8000 bytes is copied from git:

   https://github.com/git/git/blob/b7bd9486b055c3f967a870311e704e3bb0654e4f/xdiff-interface.c#L201
*)
let prefix_length = 8000
let string s = String.contains s '\000' ~len:(Int.min prefix_length (String.length s))
OCaml

Innovation. Community. Security.