Re: Using ZLib



On 29 May 2005 02:06:39 -0700, "QS Computing" <qscomputing@xxxxxxxxx>
wrote:

>J French wrote:
>> - have you tried: BytesCopied := FS2.CopyFrom(ZS, MaxInt );
>>
>> That should attempt to read MaxInt bytes from the current .Position in
>> the Stream.
>>
>> If that does not work then try repeatedly using CopyFrom on smaller
>> chunks

>I tried something like that, but I couldn't work out how to get it to
>stop when it had copied the entire stream.

Easy - the bytes returned will be fewer than the bytes requested

>BTW the ZLib code is on the Delphi CD.

Which version of Delphi are you using ?

>> Dynamic Arrays of Records
>> - available from D4 on
>> - the Arrays are always zero based
>
>Thanks - that's exactly what I was looking for.

They are useful beasts
.



Relevant Pages

  • Re: Using ZLib
    ... > That should attempt to read MaxInt bytes from the current .Position in ... stop when it had copied the entire stream. ... > Dynamic Arrays of Records ... Prev by Date: ...
    (comp.lang.pascal.delphi.misc)
  • TWriter.WriteString in Delphi7
    ... The implementation of TWriter.WriteString in Delphi 7 forces a conversion ... first to WideString, then to UTF-8 AnsiString, then a comparison... ... Delphi7 still stores the string length in the stream, ...
    (borland.public.delphi.language.objectpascal)
  • Re: Is it worth upgrading from Delphi 7 to Delphi 2005/2006?
    ... > I'm using Delphi 2006 Pro. ... The midiStreamOpen function opens a MIDI stream for output. ...
    (borland.public.delphi.non-technical)
  • Re: Reading Zip file contents without DLLs... How?
    ... string reading code does essentially what my stream read of the string does. ... Also FileRead is meant to be supplied with a variable of which Delphi ... I would be very interested to know how exactly my stream code "did not work", ... more readily used in stream extensions. ...
    (alt.comp.lang.borland-delphi)
  • Re: Quizz question : what is the equivalent of Delpi "Currency" in pureC ?
    ... A Delphi program that creates a "stream", connect to a TCP server written in C and sends this stream. ... This stream is composed of different fields, including utf-8 encoded strings and currency fields. ... Zlib is avalaible both in Delphi and Zlib in C and I've managed to compress in Delphi and to uncompress the result in C, so that shouldn't be a problem anymore... ...
    (borland.public.delphi.non-technical)