void[] vs byte[]

2010-08-28 Thread Yao G.
I'm here with another n00b question: When dealing with big buffers (or files), which is better to use as storage? void[] or byte[]? What are the advantages and disadvantages of each one? I've seen that void[] is used in some Phobos modules, like std.zlib, and in other modules the choice i

Re: void[] vs byte[]

2010-08-28 Thread BCS
Hello Yao G., I'm here with another n00b question: When dealing with big buffers (or files), which is better to use as storage? void[] or byte[]? If the data may contain pointers into the heap, use void[] if it will not use byte[]. byte[] is "raw" data, void[] is anything at all. What a

Re: void[] vs byte[]

2010-08-30 Thread Steven Schveighoffer
On Sat, 28 Aug 2010 16:13:28 -0400, BCS wrote: Hello Yao G., I'm here with another n00b question: When dealing with big buffers (or files), which is better to use as storage? void[] or byte[]? If the data may contain pointers into the heap, use void[] if it will not use byte[]. byte[] is