grauzone schrieb:
For embedding data, use import() (http://www.digitalmars.com/d/1.0/expression.html#ImportExpression). Or did you do this? I don't know the file size restrictions of import either.

Thanks, didn't know that option.
Compiles, but this leads me to the error I actually wanted to test.
std.zlib fails with "out of memory" message although another program I tested could decompress it.


I can't imagine why this shouldn't work (decompressed size resides at offset 4 and zlibbed data starts at offset 8):

ubyte[] data = cast(ubyte[]) import("save.sww");
data = cast(ubyte[]) uncompress(data[8 .. $], *cast(uint*)(data.ptr+4));



And here, as a special for Robert ;), the files on SkyDrive:
http://cid-f3bfa204ac326df0.skydrive.live.com/self.aspx/.Public/zlibtest.rar

Reply via email to