Hello,

I am trying to save some data to compressed binary files. I have my data in a struct, which I can write to a binary file just fine:

align(1) struct TradesBin {
  int ttim;
  int prc;
  int siz;
  short g127;
  short corr;
  char[2] cond;
  char ex;
}

auto fout = new BufferedFile(outfile, FileMode.Out);
fout.writeExact(&bin, TradesBin.sizeof);

Where bin is of type TradesBin, filled with data. The question is how do I now do this with zlib to get compression? Suggestions and help are mightily appreciated!

TJB

Reply via email to