IdHttpServer with compression/decompression?

I've got a IdHTTP/ IdHTTPServer client/server combination using D2007 (or D2009 if that helps) that (successfully) exchange XML documents via POST

I'd like the server to accept a compressed XML POST request and then reply with a compressed (or uncompressed) XML response from a java client
I'd like my(sample)  client to be able to compress the corresponding POST request and read the compressed response
(so I can prove that the java client should work).

I've not been able to find an example that shows both halves, and was hoping someone would help direct me to some useful clues.
Does this make sense for to "force" sending the server a compressed XML file?
 
    IdHTTP1.ProtocolVersion := pv1_1
    IdHTTP1.Request.ContentType := 'text/xml';
    IdHTTP1.Compressor := TIdCompressorZLibEx.Create(IdHttp1);
    IdHTTP1.Request.AcceptEncoding := 'gzip,deflate,';
    IdHTTP1.Request.ContentEncoding := 'gzip';

What am I missing?

Thanks in advance
1
Tan
8/17/2010 5:59:13 PM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

9 Replies
5425 Views

Similar Articles

[PageSpeed] 21
Get it on Google Play
Get it on Apple App Store

<Tan Bronson> wrote in message news:275430@forums.embarcadero.com...

> Does this make sense for to "force" sending the server a compressed XML 
> file?

No, because TIdHTTP does not support SENDING compressed requests at this 
time, only RECEIVING compressed responses.

>    IdHTTP1.ProtocolVersion := pv1_1

In order to use that with Post(), you need to enable the hoKeepOrigProtocol 
flag in the TIdHTTP.Options property.

>    IdHTTP1.Request.AcceptEncoding := 'gzip,deflate,';

Get rid of that line.  TIdHTTP manages it internally based on whether the 
Compressor is enabled.

>    IdHTTP1.Request.ContentEncoding := 'gzip';

Since TIdHTTP does not support sending a compressed request, you are 
effectively lying to the server by telling it the data is compressed when it 
really is not.  You should get rid of that line as well anyway.  If/when 
TIdHTTP is updated to support compressed requests, it will manage that 
header as well.

-- 
Remy Lebeau (TeamB)
0
Remy
8/17/2010 6:33:53 PM
> No, because TIdHTTP does not support SENDING compressed requests at this 
> time, only RECEIVING compressed responses.
So if I want to compress, I need to manually manage this in the stream?

> 
> >    IdHTTP1.ProtocolVersion := pv1_1
> 
> In order to use that with Post(), you need to enable the hoKeepOrigProtocol 
> flag in the TIdHTTP.Options property.
The risks of not including everything :-)

> >    IdHTTP1.Request.AcceptEncoding := 'gzip,deflate,';
> 
> Get rid of that line.  TIdHTTP manages it internally based on whether the 
> Compressor is enabled.
> 
> >    IdHTTP1.Request.ContentEncoding := 'gzip';
> 
> Since TIdHTTP does not support sending a compressed request, you are 
> effectively lying to the server by telling it the data is compressed when it 
> really is not.  You should get rid of that line as well anyway.  If/when 
> TIdHTTP is updated to support compressed requests, it will manage that 
> header as well.
Ok, so my attempt to use TIdHTTP is doomed, how do I get my IdHTTPServer to send back a compressed result?

thanks!
0
Tan
8/17/2010 6:55:46 PM
<Tan Bronson> wrote in message news:275484@forums.embarcadero.com...

> So if I want to compress, I need to manually manage this in the stream?

When sending a request, yes.

> Ok, so my attempt to use TIdHTTP is doomed

Not necessarily.  You can access the Compressor directly, compress your data 
to a temporary TStream, and then post that.

> how do I get my IdHTTPServer to send back a compressed result?

TIdHTTPServer does not have any native compression support of its own at 
all.  You will have to manage that manually for the time being.

-- 
Remy Lebeau (TeamB)
0
Remy
8/17/2010 8:58:41 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> <Tan Bronson> wrote in message news:275484@forums.embarcadero.com...
> 
> > So if I want to compress, I need to manually manage this in the stream?
> 
> When sending a request, yes.
Where can I find an example of this?

> > Ok, so my attempt to use TIdHTTP is doomed
> 
> Not necessarily.  You can access the Compressor directly, compress your data 
> to a temporary TStream, and then post that.
> 
> > how do I get my IdHTTPServer to send back a compressed result?
> 
> TIdHTTPServer does not have any native compression support of its own at 
> all.  You will have to manage that manually for the time being.
Ditto, where can I find an example for this?

thanks again
0
Tan
8/17/2010 9:12:28 PM
<Tan Bronson> wrote in message news:275570@forums.embarcadero.com...

> Where can I find an example of this?

The IdZLib unit has IndyCompressStream(), CompressStream(), and 
CompressStreamEx() functions available.  Any one of them should be fine. 
Simply put your data into a TStream (if it is not already) and then compress 
it to a TMemoryStream or other TStream of your choosing, and then send that 
to the other party normally.

-- 
Remy Lebeau (TeamB)
0
Remy
8/18/2010 12:28:57 AM
I've spent The better part of 2 days trying to get this working, and I'm getting closer, but am not quite there.
I can successfully compress a gzipped request, and my server receives the correct result after unzipping -yeah!
However, when I try to compress the response, the decompression fails, and the length of the response string is the original message length, not the compressed length.

I find it hard to believe that I'm the first person trying to do this.

Thanks again for your help!

The Client uses IdHTTP.DoRequest, and then manages the compression of the stream
{code}
unit IdCompressionHTTP;

interface
uses
  IdException, IdExceptionCore, IdAssignedNumbers, IdHeaderList, IdHTTPHeaderInfo, IdReplyRFC,
  IdSSL,
  IdTCPClient, IdURI, IdCookie, IdCookieManager, IdAuthentication, IdAuthenticationManager,
  IdMultipartFormData, IdGlobal, IdSys, IdObjs, IdBaseComponent, IdHTTP;

type
  TIdCompressionHTTP = class(TIdHTTP)
  private
    fUseGzip : Boolean;
    fUseInflate : Boolean;
    fUseHTTP1dot1: Boolean;
  public
    function Post(aURL: string; aRequestContent: TIdStream; aResponseContent: TIdStream = nil) : String; overload;
    destructor Destroy; override;
    property UseGzip : Boolean read fUseGzip write fUseGzip;
    property UseInflate: Boolean read fUseInflate write fUseInflate;
    property UseHTTP1dot1 : Boolean read fUseHTTP1dot1 write fUseHTTP1dot1;
  end;
implementation

uses
  SysUtils, Classes, IdZLibCompressorBase, IdCompressorZLibEx, IDZlib;
{ TIdCompressionHTTP }

destructor TIdCompressionHTTP.Destroy;
begin
  if Assigned(FCompressor) then
    FreeAndNil(FCompressor);
  
  inherited;
end;

// A version of POST that will encrupt & decrypt both ways
function TIdCompressionHTTP.Post(aURL: string; aRequestContent: TIdStream; aResponseContent: TIdStream) : String;
var
  lReqStream, lRespStream, lTmpStream: TStream;
begin
  if UseHTTP1dot1 then
    ProtocolVersion := pv1_1
  else
    ProtocolVersion := pv1_0;

  if UseGzip or UseInflate then
  begin
    if not assigned(fCompressor) then
      Compressor := TIdCompressorZLibEx.Create(Self);
    lReqStream := TMemoryStream.Create;
    lRespStream := TMemoryStream.Create;
    lTmpStream := TMemoryStream.Create;
    try
      aRequestContent.Position := 0;
      if UseGzip then
      begin
        Request.ContentEncoding := 'gzip';
        Request.AcceptEncoding := 'gzip';
        Compressor.CompressStream (aRequestContent, lReqStream, 9, GZIP_WINBITS, 9, 0);
      end
      else
      begin
        Request.ContentEncoding := 'deflate';
        Request.AcceptEncoding := 'deflate';
        Compressor.CompressHTTPDeflate(aRequestContent, lReqStream, 4);
      end;

      DoRequest(Id_HTTPMethodPost, AURL, lReqStream, lRespStream, []);

      if Response.ContentEncoding = 'gzip' then
      begin
        lRespStream.Seek(0, soFromBeginning);
        lTmpStream.Seek(0, soFromBeginning);
        Compressor.DecompressGZipStream (lRespStream, lTmpStream);

        // convert into a string
        SetLength(Result, lTmpStream.size);
        lTmpStream.Seek(0, soFromBeginning);
        lTmpStream.ReadBuffer(Result[1], lTmpStream.size);
      end
      else if Response.ContentEncoding = 'deflate' then
      begin
        // decompress
        lRespStream.Seek(0, soFromBeginning);
        lTmpStream.Seek(0, soFromBeginning);
        Compressor.DecompressHTTPDeflate (lRespStream, lTmpStream);

        // convert into a string
        SetLength(Result, lTmpStream.size);
        lTmpStream.Seek(0, soFromBeginning);
        lTmpStream.ReadBuffer(Result[1], lTmpStream.size);
      end
      else
      begin
        SetLength(Result, lRespStream.size);
        lRespStream.Seek(0, soFromBeginning);
        lRespStream.ReadBuffer(Result[1], lRespStream.size);
      end;
    finally
      lReqStream.Free;
      lRespStream.Free;
      lTmpStream.Free;
    end;
  end
  else
  begin
    Request.ContentEncoding := '';
    lRespStream := TMemoryStream.Create;
    try
      DoRequest(Id_HTTPMethodPost, AURL, aRequestContent, lRespStream, []);

      SetLength(Result, lRespStream.size);
      lRespStream.Seek(0, soFromBeginning);
      lRespStream.ReadBuffer(Result[1], lRespStream.size);
    finally
      lRespStream.Free;
    end;
  end;

end;

end.


{code}

This is the 'POST' processing of my OnCommandGet.
{code}

procedure TDataModuleWS.ProcessPost(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
  lReqBuffer, lRespBuffer: String;
  lWorker : TDispatcher;
  lCompressor: TIdCompressorZLibEx;
  lTmpStream: TStream;
  lRequestId: Integer;
begin
  if ARequestInfo.ContentEncoding = 'gzip' then
  begin
    lCompressor := TIdCompressorZLibEx.Create;
    lTmpStream := TMemoryStream.Create;
    try
      // decompress
      ARequestInfo.PostStream.Seek(0, soFromBeginning);
      lTmpStream.Seek(0, soFromBeginning);
      lCompressor.DecompressGZipStream (ARequestInfo.PostStream, lTmpStream);
      
      // convert into a string
      SetLength(lReqBuffer, lTmpStream.size);
      lTmpStream.Seek(0, soFromBeginning);
      lTmpStream.ReadBuffer(lReqBuffer[1], lTmpStream.size);
    finally
      lCompressor.Free;
      lTmpStream.Free;
    end;
    WriteLog('Processing gzipped request from ' + ARequestInfo.RemoteIP);
  end
  else if ARequestInfo.ContentEncoding = 'deflate' then
  begin
    lCompressor := TIdCompressorZLibEx.Create;
    lTmpStream := TMemoryStream.Create;
    try
      // decompress
      ARequestInfo.PostStream.Seek(0, soFromBeginning);
      lTmpStream.Seek(0, soFromBeginning);
      lCompressor.DecompressHTTPDeflate (ARequestInfo.PostStream, lTmpStream);
      
      // convert into a string
      SetLength(lReqBuffer, lTmpStream.size);
      lTmpStream.Seek(0, soFromBeginning);
      lTmpStream.ReadBuffer(lReqBuffer[1], lTmpStream.size);
    finally
      lCompressor.Free;
      lTmpStream.Free;
    end;
    WriteLog('Processing inflated request from ' + ARequestInfo.RemoteIP);
  end
  else
  begin
    lReqBuffer := ARequestInfo.Params.GetText;
    if lReqBuffer = '' then
      lReqBuffer := ARequestInfo.UnparsedParams;
    if (lReqBuffer = '') and (ARequestInfo.PostStream.size > 0) then
    begin
      SetLength(lReqBuffer, ARequestInfo.PostStream.size);
      ARequestInfo.PostStream.Seek(0, soFromBeginning);
      ARequestInfo.PostStream.ReadBuffer(lReqBuffer[1], ARequestInfo.PostStream.size);
    end;
    WriteLog('Processing request from ' + ARequestInfo.RemoteIP);
   end;

  lRequestId := 0;
  // is there an XML document
  if Pos('<?xml', Lowercase(lReqBuffer)) > 0 then
  begin
    lWorker := TDispatcher.Create(lReqBuffer);
    try
      lRespBuffer := lWorker.Execute;
      lRequestId := lWorker.RequestId;
      if  (ARequestInfo.ContentEncoding = 'gzip') and (POS('gzip', ARequestInfo.AcceptEncoding) > 0)  then
      begin
        lCompressor := TIdCompressorZLibEx.Create;
        lTmpStream := TMemoryStream.Create;
        AResponseInfo.ContentStream := TMemoryStream.Create;
        try
          AResponseInfo.ContentText := '';
          AResponseInfo.ContentEncoding := 'gzip';

          // compress
          lTmpStream.Write(lRespBuffer, Length(lRespBuffer));
          lTmpStream.Seek(0, soFromBeginning);
          lCompressor.CompressStream(lTmpStream, AResponseInfo.ContentStream,9,GZIP_WINBITS,9,0);
        finally
          lCompressor.Free;
          lTmpStream.Free;
        end;
        AResponseInfo.WriteContent;
      end
      else if  (ARequestInfo.ContentEncoding = 'deflate') and (POS('deflate', ARequestInfo.AcceptEncoding) > 0)  then
      begin
        lCompressor := TIdCompressorZLibEx.Create;
        lTmpStream := TMemoryStream.Create;
        AResponseInfo.ContentStream := TMemoryStream.Create;
        try
          AResponseInfo.ContentText := '';
          AResponseInfo.ContentEncoding := 'deflate';
          
          // compress
          lTmpStream.Write(lRespBuffer, Length(lRespBuffer));
          lTmpStream.Seek(0, soFromBeginning);
          lCompressor.CompressHTTPDeflate(lTmpStream, AResponseInfo.ContentStream,4);
        finally
          lCompressor.Free;
          lTmpStream.Free;
        end;
      end
      else
      begin
        AResponseInfo.ContentText := lRespBuffer;
      end;
    finally
      FreeAndNil(lWorker);
    end;
  end
  else
  begin
    AResponseInfo.ResponseNo := 404;
    AResponseInfo.ContentText := Format('Invalid POST ''%s'' (''%s'')',
                  [ARequestInfo.Document, ARequestInfo.Params.Text]);
    WriteLog(AResponseInfo.ContentText);
  end;

  if fLog.Debugging and fSaveRequestXML then
  begin
    //Write Out the Request
    if Trim( lReqBuffer ) <> '' then
      SaveOutputToFile(lReqBuffer, fOutputFileLocation, True, 'ReqId_'+IntToStr(lRequestId));

    //Write Out the Response
    lReqBuffer := AResponseInfo.ContentText;
    if Trim( lReqBuffer ) <> '' then
      SaveOutputToFile(lReqBuffer, fOutputFileLocation, False, 'ReqId_'+IntToStr(lRequestId));
  end;
end;
{code}
0
Tan
8/18/2010 10:07:28 PM
<Tan Bronson> wrote in message news:276168@forums.embarcadero.com...

> However, when I try to compress the response, the decompression
> fails, and the length of the response string is the original message 
> length,
> not the compressed length.

On the client side, TIdHTTP already decodes compressed responses if a 
Compressor is assigned (that is why the Compressor property was introduced). 
You are trying to uncompress data that has already been uncompressed by 
TIdHTTP internally.

On the server side, you are not taking into account that 'String' is Unicode 
in D2009+, not Ansi anymore.

> The Client uses IdHTTP.DoRequest, and then manages the compression
> of the stream

You should only be compressing the request data, not decompressing the 
response data yourself.  Let TIdHTTP do most of the work for you.

Also, there are some other minor issues with your client code, like the fact 
that you are using the IdSys and IdObjs units.  Those units were eliminated 
from Indy a LONG time ago, which means you are using a VERY old version of 
Indy 10.  Please upgrade to a newer version, and then try this:

{code:delphi}
unit IdCompressionHTTP;

interface

uses
  Classes, IdHTTP;

type
  eCompressionType = (ctNone, ctGzip, ctInflate);

  TIdCompressionHTTP = class(TIdHTTP)
  private
    fReqCompType: eCompressionType;
    fUseHTTP1dot1: Boolean;
  public
    function Post(AURL: string; ASource: TStream) : String; reintroduce;
    property RequestCompressionType: eRequestCompressionType read 
fReqCompType write fReqCompType;
    property UseHTTP1dot1 : Boolean read fUseHTTP1dot1 write fUseHTTP1dot1;
  end;

implementation

uses
  IdZLibCompressorBase, IdCompressorZLibEx, IDZlib;

{ TIdCompressionHTTP }

function TIdCompressionHTTP.Post(AURL: string; ASource: TStream) : String;
var
  lReqStream: TStream;
begin
  if UseHTTP1dot1 then
  begin
    ProtocolVersion := pv1_1;
    Options := Options + [hoKeepOrigProtocol];
  end else
    ProtocolVersion := pv1_0;

  if fReqCompType  = ctNone then
  begin
    Request.ContentEncoding := '';
    Result := inherited Post(AURL, ASource);
    Exit;
  end;

  if not Assigned(Compressor) then
    Compressor := TIdCompressorZLibEx.Create(Self);

  lReqStream := TMemoryStream.Create;
  try
    ASource.Position := 0;
    if fReqCompType = ctGzip then
    begin
      Request.ContentEncoding := 'gzip';
      Compressor.CompressStream(ASource, lReqStream, 9, GZIP_WINBITS, 9, 0);
    end else
    begin
      Request.ContentEncoding := 'deflate';
      Compressor.CompressHTTPDeflate(ASource, lReqStream, 4);
    end;
    lReqStream.Position := 0;
    Result := inherited Post(AURL, lReqStream);
  finally
    lReqStream.Free;
  end;
end;

end.
{code}

{code:delphi}
procedure TDataModuleWS.ProcessPost(AContext: TIdContext; ARequestInfo: 
TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
  lReqBuffer, lRespBuffer: String;
  lWorker : TDispatcher;
  lCompressor: TIdCompressorZLibEx;
  lTmpStream: TStream;
  I, lRequestId: Integer;
begin
  if Assigned(ARequestInfo.PostStream) then
  begin
    I := PosInStrArray(ARequestInfo.ContentEncoding, ['gzip', 'deflate'], 
False);
    if i <> -1 then
    begin
      lCompressor := TIdCompressorZLibEx.Create;
      try
        lTmpStream := TMemoryStream.Create;
        try
          // decompress
          if I = 0 then
            lCompressor.DecompressGZipStream (ARequestInfo.PostStream, 
lTmpStream);
          else
            lCompressor.DecompressHTTPDeflate (ARequestInfo.PostStream, 
lTmpStream);
          // convert into a string
          lTmpStream.Position := 0;
          lReqBuffer := ReadStringAsCharset(lTmpStream, 
ARequestInfo.Charset);
        finally
          lTmpStream.Free;
        end;
      finally
        lCompressor.Free;
      end;
      WriteLog('Processing compressed request from ' + 
ARequestInfo.RemoteIP);
    end else
    begin
      // convert into a string
      lReqBuffer := ReadStringAsCharset(ARequestInfo.PostStream, 
ARequestInfo.Charset);
      WriteLog('Processing uncompressed request from ' + 
ARequestInfo.RemoteIP);
    end;
  end else
  begin
    lReqBuffer := ARequestInfo.Params.Text;
    if lReqBuffer = '' then
      lReqBuffer := ARequestInfo.UnparsedParams;
    WriteLog('Processing request from ' + ARequestInfo.RemoteIP);
  end;

  lRequestId := 0;
  // is there an XML document
  if TextStartsWith(lReqBuffer, '<?xml') then
  begin
    lWorker := TDispatcher.Create(lReqBuffer);
    try
      lRespBuffer := lWorker.Execute;
      lRequestId := lWorker.RequestId;
      if Pos('gzip', ARequestInfo.AcceptEncoding) > 0 then
        I := 0
      else if Pos('deflate', ARequestInfo.AcceptEncoding) > 0 then
        I := 1
      else
        I := -1;
      if I <> -1 then
      begin
        lCompressor := TIdCompressorZLibEx.Create;
        try
          lTmpStream := TMemoryStream.Create;
          try
            AResponseInfo.ContentStream := TMemoryStream.Create;
            // compress
            WriteStringToStream(lTmpStream, lRespBuffer, 
TIdTextEncoding.UTF8); // or other suitable byte encoding
            lTmpStream.Position := 0;
            if I = 0 then
            begin
              lCompressor.CompressStream(lTmpStream, 
AResponseInfo.ContentStream,9,GZIP_WINBITS,9,0);
              AResponseInfo.ContentEncoding := 'gzip';
            end else
            begin
              lCompressor.CompressHTTPDeflate(lTmpStream, 
AResponseInfo.ContentStream,4);
              AResponseInfo.ContentEncoding := 'deflate';
            end;
          finally
            lTmpStream.Free;
          end;
        finally
          lCompressor.Free;
        end;
      end else
      begin
        AResponseInfo.ContentText := lRespBuffer;
        AResponseInfo.CharSet := 'utf-8'; // or other suitable byte encoding
      end;
    finally
      FreeAndNil(lWorker);
    end;
  end else
  begin
    AResponseInfo.ResponseNo := 400;
    AResponseInfo.ContentText := Format('Invalid POST ''%s'' (''%s'')', 
[ARequestInfo.Document, ARequestInfo.Params.Text]);
    WriteLog(AResponseInfo.ContentText);
  end;

  if fLog.Debugging and fSaveRequestXML then
  begin
    //Write Out the Request
    if Trim( lReqBuffer ) <> '' then
      SaveOutputToFile(lReqBuffer, fOutputFileLocation, True, 
'ReqId_'+IntToStr(lRequestId));

    //Write Out the Response
    lReqBuffer := AResponseInfo.ContentText;
    if Trim( lReqBuffer ) <> '' then
      SaveOutputToFile(lReqBuffer, fOutputFileLocation, False, 
'ReqId_'+IntToStr(lRequestId));
  end;
end;
{code}

-- 
Remy Lebeau (TeamB)
0
Remy
8/19/2010 2:07:24 AM
As you expected as soon as I downloaded the latest IndyTuburon.zip, got it installed, it worked - yeah!

I did run into three minor  differences (that might be due to my using IndyTuburion, instead of Indy10)
 --  IdHttp.Options was renamed to HttpOptions
 -- TIdCompressorZLibEx doesn't exist, but TIdCompressorZLib does.
 -- I needed to use ReadStringFromStream, instead of ReadStringAsCharset.

So one last question - which version of Indy "should" I be using?
I'd like to convert this project to D2009, but last time we tried we ran into character issue with our java client, and we made a hasty retreat

Thank you so much!
0
Tan
8/19/2010 9:06:12 PM
<Tan Bronson> wrote in message news:276469@forums.embarcadero.com...

> --  IdHttp.Options was renamed to HttpOptions

Yes, so it does not conflict with the TIdHTTP.Options() method.

> -- TIdCompressorZLibEx doesn't exist, but TIdCompressorZLib does.

Yes.

> -- I needed to use ReadStringFromStream, instead of ReadStringAsCharset.

I intentionally chose ReadStringAsCharset() so that the code decodes the 
(uncompressed) raw bytes to UTF-16 correctly based on which charset the 
client is actually using.

> So one last question - which version of Indy "should" I be using?

Tiburon.

-- 
Remy Lebeau (TeamB)
0
Remy
8/20/2010 12:25:58 AM
Reply:

Similar Artilces:

Compression and Decompression using System.IO.Compression
HI I need to compress a file and decompress the compressed file. I am  using C#.Net 2.0. I searched in the web and got a program. http://msdn2.microsoft.com/en-us/library/system.io.compression.gzipstream(VS.80).aspx But in that program, it ask the file and it compress and immediately decompress. ie the example program like this. I need to save the compress file into the disk and decompress the file from the disk. How to acheive it? Please give the solution for this issue as soon as possible.  Thanks is advance. Ganesh. You were close.  Check out the sample that uses ...

To compress or not to compress
Currently we run disk compression on our NW 5.1 server but the problem is that the decompression of files i very slow. In this day of quick decision making I am wondering if it's time to drop compression. Anyone with opinions on this? If I do drop compression, is it possible to just switch it off or do I have to rebuild NSS pools and volumes. G of Borg wrote: > Currently we run disk compression on our NW 5.1 server but the problem > is that the decompression of files i very slow. In this day of quick > decision making I am wondering if it's time to drop compres...

Compression or No Compression
I am looking to upgrade 5.1 servers with traditional volumes with compression turned on to 6.5 servers with NSS volumes. What is the recommendation as far as having compression turned on or not on the NSS volumes? Any thoughts. Dan It's got better, but with the size of modern drives, compression is probably better left off. Provided you are on at least NW6/SP3 with the NSS3c patch, compression on NSS is pretty much usable if you do need the space Cheers Dave -- Dave Parkes [NSCS] Occasionally resident at http://support-forums.novell.com/ ...

To compress or not compress...
We have an old HP NW 5.1 server (vintage 1998) we are planning to migrate to a new Dell 2850 running NW 6.5. This server is a repository for 200,000+ transaction files that are all .MDB files. The files are kept strictly for audit and historical purposes and are only accessed on occasion. Three years of data are kept on the server and we have archive backups for 7 years. The old server has compression enabled on a "legacy" volume. The MDB files compress at about a 10 to 1 ratio which has allowed us to keep almost 400GB of data on a 50GB volume. The other benefit o...

Compression and Decompression question
I'm learning about the DeflateStream class and I've written a test script that reads in a file, compresses the file and writes it to the file system, then reads the compressed file and writes it back as an uncompressed file.  Compression seems to be working great and decompressing the file returns the file exactly how it was input....except it's missing the last 1100 bytes.  Can someone please take a look at this code block and tell me where I'm going wrong.    Thanks in advance!    1 try 2 { 3 string o...

Decompress compressed files?
I have a sys vol that was set to compress from TFS days and it carried over to NSS. I have been able to decompress all that I have been able to find by "touching" the compressed files in Windows Explorer. I now have a final 14Mb worth of compressed files being reported, but can't find them. Even after doing an ndir sys:\*.* /s /Co (this comes back with no results). To me, this means I got all the visible ones, how do I find and decompress what I'm missing. One final question, is there a faster way to do what I did in Win Explorer? Some utility? Command? ...

Compress and decompress files
Hello again I would like to know if through a script in PB, you can unzip a file. Zip? Thanks. http://www.topwizprogramming.com/freecode_zlibwapi.html sounds like just what you need. Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do Product Enhancement Requests: http://my.isug.com/cgi-bin/1/c/submit_enhancement On 10/26/2010 7:06 PM, Helbert Jim�nez wrote: > Hello again > > I would like to know if through a script in PB, you can > unzip a file. Zip? > > Thanks. ...

compress vs compression
Team, Are there any reasons for using the compress:: method when doing a backup? I know that 'with compression" can be used with archive databases, cross server loads, and with remote backup servers. I'm trying to see if there are any holes in the "with compression" method as I try to convince my co-workers to switch methods. Cory Sane wrote: > Team, > > Are there any reasons for using the compress:: method when doing a backup? > > I know that 'with compression" can be used with archive databases, cross > server lo...

NSS to compress or not to compress?
We are planning to migrate another server from Netware 5.1 with traditional volumes and compression - 5 x 36Gb disks in RAID5, current usage approx 90Gb, uncompressed size 132Gb - to Netware 6.5 on different hardware in which we have matching 5 x 36Gb disks in RAID5. What is current advice on using compression on NSS volumes? (I searched here and didn't see anything less than 6 months old, we are running NSS.NLM 3.22 13 Sept 2004 on our other NW6.5 servers.) Anthony I've never been a fan for compression -- earlier iterations of NSS compression were problematic -- current...

How uncompress /Decompress the Compress files...
Hi Im Having a Fileupload control.Where im trying to upload either winzip files or winrar files to server. Now from server i need to decompress those ziped file into filess..can any1 tell me how to us unrar.dll  With regards,Mahender   I would look into CSharpZipLib or Chilkat.  CSharpZipLib is probably the most commonly used outside of the framework libraries, but Chilkat has some added unzipping features (like the time I need to unzip .tar and .z files that CSharpZipLib couldn't handle). Once you find a library that will decompress the type of file you're...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Compression between Delphi 2006 and DelphiXE
We compress data sent between client and server using ZLib and it works fine in Deplhi2006 and DelphiXE but it doesn't work if client is compiled using Delphi2006 and server using DelphiXE. It looks like the compression format has changed between delphi version, is this correct? Has anyone else seen this? Any fix for this problem? Regards Sandeep Hello Sandeep, I'm not aware of any incompatibility between Delphi 2006 and Delphi XE other than the [big issue] of Unicode. But that should not affect the transferred data. You just may have to update code that ran ...

compression and decompression of images in .net
HI am working in healthcare domain and working upon RIS i.e radiology information system it mainly deals with the medical images as XRAY n CT images are large in size so it take time to upload an d download..IS compression n decompression will help to solve this problem or any other solutions for images.Thanks Rajnish chattha I dont think that would help any since they image would need to be compressed BEFORE it's uploaded, otherwise it's not going to save any time/bandwidth. You may want to look at some type of ActiveX plugin on the clientside to compress prior to upload. &nbs...

compress and decompress files with Pb
How can I compress and decompress files with Pb and write to disk as a zip,arj etc. files? Which dll or api can I use? I tried zlib.dll but I can not add a file to zip file. Have anybody got idea or example with zlib.dll or others? Thanks Murat Yelkovan Here's what i found , hopes this helps you out ActiveX OCX to create, update, modify, test, list and extract normal and encrypted Zip files, compatible with Win95/WinNT4.0/Win98/Win98SE/Windows 2000, compatible with UNC paths, full support to password protected Windows Networks, ability to change the ...

Web resources about - IdHttpServer with compression/decompression? - embarcadero.delphi.winsock

Decompression practice - Wikipedia, the free encyclopedia
The practice of decompression by divers comprises the planning and monitoring of the profile indicated by the algorithms or tables of the chosen ...

Flight MH17 suffered 'massive explosive decompression,' black boxes show - CTV News
Heavy fighting raged Monday around the Malaysia Airlines debris field, once again preventing an international police team charged with securing ...

Sunday Morning Decompression Open Thread
( Arlo and Janis via GoComics.com) The Spousal Unit was away over the long weekend, and I was going to use the time to do a whole bunch of projects ...

Malaysia Airlines black box data reveal "massive explosive decompression" - Videos - CBS News
The black boxes that were handed over intact from Malaysia Airlines Flight 17 have begun to provide vital clues of what brought the aircraft ...

Missile likely caused ‘catastrophic decompression’ for MH17 passengers: Expert
Filed under: Identity Theft, Credit Cards, Internet FraudAP/Toby Talbot The Home Depot (HD) estimates that a cyberattack earlier this year affected ...

Patent US4558302 - High speed data compression and decompression apparatus and method - Google Patents ...
A data compressor compresses an input stream of data character signals by storing in a string table strings of data character signals encountered ...

MH17's Black Box Of Little Use In Event Of 'Instant Decompression' Caused By Buk Missile Strike
Investigators expect to hear the final moments of MH17 within 24 hours, but that information will likely be of little help.

Burning Man Decompression 2012 Heat the Street Faire
The 13th annual Burning Man Decompression 2012 takes place Sunday, October 7, 2012 in San Francisco beginning at Noon and going until midnight. ...

Your iPad Can Survive Rapid Decompression
No one really wants to be on an airliner that loses cabin pressure, but if it happens to you, rest assured your iPad will continue to work.

Magma fragmentation by rapid decompression
Mikhail Alidibirov & Donald B. Dingwell Bayerisches Geoinstitut, Universitat Bayreuth, D-95440 Bayreuth, Germany THE processes leading to magma ...

Resources last updated: 1/18/2016 11:17:40 PM