mirage / ocaml-crunch

Convert a filesystem into a static OCaml module
Other
73 stars 21 forks source link

chunked reading with -m plain #40

Open cfcs opened 7 years ago

cfcs commented 7 years ago

It would be nice to have a

read_sub : string (** filename *) ->
             ?start:int ->
             int (** length *) -> string

-like function to limit the amount of duplicate memory lying around

MisterDA commented 2 years ago

Is it necessary in the first place to split files in chunks with the plain module? If the chunks aren't directly accessible we're just re-concatenating the files everytime it's accessed. I guess the size limit is just the length of OCaml strings, right?

cfcs commented 2 years ago

@MisterDA I believe so, yes - but OCaml strings are pretty small on 32bit machines. For 64bit it's probably not needed.