dnf90版本街霸刷图加点:请问下面一些命令是用什么语言编写的啊?
来源:百度文库 编辑:高校问答 时间:2024/05/09 05:56:19
let ic = open_in_bin Sys.argv.(1)
let is_OggS =
let buffer = String.create 4 in
fun pos ->
seek_in ic pos;
really_input ic buffer 0 4;
buffer = "OggS"
let is_Xiphophorus_libVorbis =
let buffer = String.create 21 in
fun pos ->
seek_in ic pos;
really_input ic buffer 0 21;
buffer = "Xiphophorus libVorbis"
let find_next pos =
let rec loop lpos =
if is_OggS lpos && is_Xiphophorus_libVorbis (lpos + 109)
then lpos
else loop (lpos + 1)
in
loop (pos + 200)
let buffer = String.create 16384
let rec loop idx spos =
let epos, cont =
try
find_next spos, true
with End_of_file ->
in_channel_length ic, false
in
let oc = Printf.ksprintf open_out_bin "%06d.ogg" idx in
let rec copy rem =
if rem = 0 then
()
else
let max = if rem < 16384 then rem else 16384 in
let count = input ic buffer 0 max in
output oc buffer 0 count;
copy (rem - count)
in
seek_in ic spos;
copy (epos - spos);
close_out oc;
if cont then loop (idx + 1) epos
let () =
loop 0 0;
close_in ic
文件的扩展名是*.ml和*.mll
let is_OggS =
let buffer = String.create 4 in
fun pos ->
seek_in ic pos;
really_input ic buffer 0 4;
buffer = "OggS"
let is_Xiphophorus_libVorbis =
let buffer = String.create 21 in
fun pos ->
seek_in ic pos;
really_input ic buffer 0 21;
buffer = "Xiphophorus libVorbis"
let find_next pos =
let rec loop lpos =
if is_OggS lpos && is_Xiphophorus_libVorbis (lpos + 109)
then lpos
else loop (lpos + 1)
in
loop (pos + 200)
let buffer = String.create 16384
let rec loop idx spos =
let epos, cont =
try
find_next spos, true
with End_of_file ->
in_channel_length ic, false
in
let oc = Printf.ksprintf open_out_bin "%06d.ogg" idx in
let rec copy rem =
if rem = 0 then
()
else
let max = if rem < 16384 then rem else 16384 in
let count = input ic buffer 0 max in
output oc buffer 0 count;
copy (rem - count)
in
seek_in ic spos;
copy (epos - spos);
close_out oc;
if cont then loop (idx + 1) epos
let () =
loop 0 0;
close_in ic
文件的扩展名是*.ml和*.mll
一看就是汇编语言编写的
由于有 LET 这是BASIC中的赋值语句
这应该是 visual basic 也就是VB
似一些过程的脚本.