Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
10
Task/Bitwise-IO/OCaml/bitwise-io-2.ml
Normal file
10
Task/Bitwise-IO/OCaml/bitwise-io-2.ml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
let read_7bit_string ~filename =
|
||||
let ic = open_in filename in
|
||||
let ib = IO.input_bits(IO.input_channel ic) in
|
||||
let buf = Buffer.create 2048 in
|
||||
try while true do
|
||||
let c = IO.read_bits ib 7 in
|
||||
Buffer.add_char buf (char_of_int c);
|
||||
done; ""
|
||||
with IO.No_more_input ->
|
||||
(Buffer.contents buf)
|
||||
Loading…
Add table
Add a link
Reference in a new issue