Re: I have a problem with FTP transfert in compress mode.

Giganews Newsgroups
Subject: Re: I have a problem with FTP transfert in compress mode.
Posted by:  Kwisatz Hotline (kwisatz.hotli…@free.fr)
Date: Fri, 2 Jun 2006

hello,

Why i haven't response for my problem ?
i trace the source of the procedure compressStream in the unit ZLIB. I
detect this problem :
i have a file ARTICLE.MB, the size of this file is : 3 342 336 octets. it
contains JPG image. the compression of this file is not possible.
when the routine of compression finish : the avail_in and avail_out equal 0.
To finish operation this instruction is called : Finished :=
CCheck(deflate(strm, Z_FINISH)) = Z_STREAM_END;
a this moment the error occurs : ECompressionError -> Buffer Error.

the number of packet readed and compressed  is equal : 3 342 336 / 65536 ->
51 packets. When the loop :
repeat
      if strm.avail_in = 0 then
      begin
      if UseInBuf then
        begin
          strm.avail_in := InStream.Read(InBuf^, BufSize);
          strm.next_in  := InBuf;
        end;
        if strm.avail_in = 0 then  break;
      end;

      if strm.avail_out = 0 then WriteOut;
      CCheck(deflate(strm, Z_NO_FLUSH));
    until false;

the strm.avail_out=0.

thanks for response.

"Kwisatz Hotline" <kwisatz.hotli…@free.fr> a écrit dans le message de
news:9C29C26ACDF8E240kwisatz.hotli…@free.fr...
> Hi,
>
> When i use ftpserver with compress mode, i have an error when ZLIB
compress
> my file ARTICLE.MB.
> An exception occurs : ECompressionError -> Buffer Error.
> Have you an idea, why this exception occurs.
>
> if use the transfert FTP without compress mode , the file transfert
> normally.
> I use Indy 10.1.5.
>
> Thanks for response.

Replies

In response to

I have a problem with FTP transfert in compress mode. posted by Kwisatz Hotline on Wed, 17 May 2006