Browse thread
[Caml-list] [ANN] The Missing Library
-
John Goerzen
-
Kenneth Knowles
- Alexander V. Voinov
-
John Goerzen
-
Maxence Guesdon
-
John Goerzen
- Maxence Guesdon
-
John Goerzen
-
Alain.Frisch@e...
-
John Goerzen
-
Alain.Frisch@e...
-
Nicolas Cannasse
-
Yamagata Yoriyuki
- Gerd Stolpmann
-
Nicolas Cannasse
-
Yamagata Yoriyuki
- Jacques GARRIGUE
-
Nicolas Cannasse
- skaller
- Yamagata Yoriyuki
-
Yamagata Yoriyuki
-
Yamagata Yoriyuki
-
Nicolas Cannasse
- oliver@f...
-
Alain.Frisch@e...
-
John Goerzen
- Henri DF
- Shawn Wagner
- james woodyatt
-
Alain.Frisch@e...
- Basile STARYNKEVITCH
-
John Goerzen
- Kenneth Knowles
- Florian Hars
-
Maxence Guesdon
- Eric C. Cooper
-
Kenneth Knowles
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Benjamin Geer <ben@s...> |
| Subject: | Re: [Caml-list] Re: Common IO structure |
Richard Jones wrote: > Actually me too. 90% of my file IO requirement is to slurp a whole > file into a string Sometimes I also do get very large messages, so it's nice if, when converting from, say, Arabic EBCDIC encoding to Unicode, I don't have to read the entire message as EBCDIC bytes, then convert the whole thing to Unicode at once. It uses much less memory if I can read, say, 1K of EBCDIC bytes, convert them to Unicode characters, append them to a string buffer, and repeat until done. Another thing that I get fairly often (though less often) is a file containing many messages separated by some delimiter. In this case I want to read through the file, converting bytes to Unicode characters as I go along, and looking for the delimiter until I have a whole message in a string. I don't want to read the whole file at once, because it might be far too big. Ben ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners