1 disk
= "\0" * (1024*1024);
25 def pread(h
, count
, offset
):
27 return bytearray (disk
[offset
:offset
+count
])
29 def pwrite(h
, buf
, offset
):
31 end
= offset
+ len (buf
)
32 disk
= disk
[:offset
] + buf
+ disk
[end
:]
37 def trim(h
, count
, offset
):