package sherlodoc
Search engine for OCaml documentation
Install
dune-project
Dependency
Authors
Maintainers
Sources
odoc-3.1.0.tbz
sha256=355b3cfff4934903cbaed8b51ce35e333e8609932d230294200a9f2d42ffa914
sha512=f78318d0a16164a9cd16ee02f611c2e00d32b772fe38e992d6db6ec94b1c00cd9c377fbfe64031b8f245e57b2f3aac9364108327e7f1693533ddcff94c476e05
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 32
type 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)"
>