package sherlodoc
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Search engine for OCaml documentation
Install
dune-project
Dependency
Authors
Maintainers
Sources
odoc-3.2.1.tbz
sha256=d45eb125514839fd9ac27702bb4938d1b4f3b6978e9b16ab9673ea067245affc
sha512=3555386b4770a7caa8ec903683bde5ecdc41d5e57ffaee617d5da225c747bbd1e9c1d2677f4df97e96bbdfc69f580ea83b1b92b933ea40a436a658788b677bbc
doc/src/sherlodoc.storage_js/storage_js.ml.html
Source file storage_js.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32type writer = out_channel let open_out = open_out let close_out = close_out let deflate_string ?(level = 4) str = let i = De.bigstring_create De.io_buffer_size in let o = De.bigstring_create De.io_buffer_size in let w = De.Lz77.make_window ~bits:15 in let q = De.Queue.create 0x1000 in let r = Buffer.create 0x1000 in let p = ref 0 in let refill buf = let len = min (String.length str - !p) De.io_buffer_size in Bigstringaf.blit_from_string str ~src_off:!p buf ~dst_off:0 ~len ; p := !p + len ; len in let flush buf len = let str = Bigstringaf.substring buf ~off:0 ~len in Buffer.add_string r str in Zl.Higher.compress ~level ~dynamic:true ~w ~q ~refill ~flush i o ; Buffer.contents r let save ~db t = let str = Marshal.to_string t [] in let str = deflate_string str in let str = Base64.encode_string str in Printf.fprintf db "function sherlodoc_db () { return %S; }\n%!" str let load _ = failwith "js database format is unsupported"
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>