El 16/09/2016 a las 10:16, Santiago A. escribió:

Hello,

     StrmEnc85:=TAscii85EncoderStream.Create(StrmOut,72,True);
     try
       StrmEnc85.CopyFrom(StrmIn,0);
       Result:=StrmOut.DataString;
     finally
       StrmEnc85.Free;

Maybe there is something wrong in ASCII85 encoder, but this code is wrong, it should be something like:

      try
        StrmEnc85.CopyFrom(StrmIn,0);
        StrmEnc85.Free;
        Result:=StrmOut.DataString;
      finally

Because stream must be flushed before extracting result and the flush is performed in the destroy.

Saludos!.

--

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to