On 25-Sep-12 00:10, TJB wrote:
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 {
Just a note: recently compiler changed so this align(1) have no effect
on the fields
On Tue, 25 Sep 2012 03:25:37 +0200, TJB wrote:
Since you're already set up with the Stream interface, try creating a
MemoryStream instead of a BufferedFile. Write to the stream just as
you are now, then use the .data() property (on MemoryStream's
superclass,
TArrayStream) to get an array of
On Tuesday, 25 September 2012 at 18:08:44 UTC, Justin Whear wrote:
I wrote up a quick example program and pasted it here:
http://dpaste.dzfl.pl/f1699d07
Hope that helps you out.
Justin,
Thanks so much! Very helpful!!!
TJB
On Tue, 25 Sep 2012 18:08:44 +, Justin Whear wrote:
On Tue, 25 Sep 2012 03:25:37 +0200, TJB wrote:
Since you're already set up with the Stream interface, try creating a
MemoryStream instead of a BufferedFile. Write to the stream just as
you are now, then use the .data() property (on
On Tuesday, 25 September 2012 at 18:08:44 UTC, Justin Whear wrote:
I wrote up a quick example program and pasted it here:
http://dpaste.dzfl.pl/f1699d07
Hope that helps you out.
OK, I think I am working this out. Let's say I want to write the
data to a gzipped file that will be
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
Since you're already set up with the Stream interface, try
creating a
MemoryStream instead of a BufferedFile. Write to the stream
just as you
are now, then use the .data() property (on MemoryStream's
superclass,
TArrayStream) to get an array of raw bytes. You can feed this
array into
the