1 module ztest
/*is aliced*/;
10 // ////////////////////////////////////////////////////////////////////////// //
11 enum ArcName
= "z00.arz";
12 //enum FileName = "arsd.cgi.Cgi.request.html";
13 //enum DirName = "experimental-docs";
14 enum FileName
= "license.txt";
15 enum DirName
= "00/dmd2";
18 // ////////////////////////////////////////////////////////////////////////// //
19 void main (string
[] args
) {
22 writeln("opening archive...");
23 arc
.openArchive(args
.length
> 1 ? args
[1] : ArcName
);
24 writeln(arc
.files
.length
, " files found");
27 auto fl
= File(DirName
~"/"~FileName
);
28 ofile
= new ubyte[](cast(uint)fl
.size
);
32 auto fl
= arc
.open(args
.length
> 2 ? args
[2] : FileName
);
33 writeln("size: ", fl
.size
);
35 foreach (immutable _
; 0..1000000) {
37 uint npos
= uniform
!"[)"(0, fl
.size
);
41 auto r
= fl
.rawRead(b
[]);
42 if (r
.length
!= b
.length
) {
43 writeln("opos=", opos
, "; npos=", npos
);
46 if (b
[0] != ofile
[npos
]) {
47 writeln("opos=", opos
, "; npos=", npos
, "; ofile[npos]=", ofile
[npos
], "; b[0]=", b
[0]);