🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8246

Re: How can I compress the stream before i send it to a web server ?

#8246
From: Ronald Wildenberg
Date: Mon, 02 Apr 2001 07:42
21 lines
1489 bytes
Hi,

I think you can use ZipOutputStream to do this. Socket returns an
OutputStream, which you can wrap inside a ZipOutputStream like
this.

zipOutputStream = new ZipOutputStream(mySocket.getOutputStream());

Then you simply write bytes to zipOutputStream. I think this should work,
I have not tested it.

Ronald.

Big Peter wrote:

> Hi,
> I use Socket and try to compress a long stream (not a file) sent
> from an client applet to a web server, and the web server will accept
> and unzip it. How can I compress the stream before i send it to a web server
> ?
> Thanks in advance.
Technical Details
Message-ID: <3AC82D68.67C7F402@tryllian.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!zeus.visi.com!news-out.visi.com!hermes.visi.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!62.58.162.210
References: <3ac6fc90_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,5abc863e933393af
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-04-02 00:54:06 PST
Message-ID: <3AC82D68.67C7F402@tryllian.com>
Date: Mon, 02 Apr 2001 09:42:33 +0200
From: Ronald Wildenberg <ronald@tryllian.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: How can I compress the stream before i send it to a web server ?
References: <3ac6fc90_2@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.58.162.210
X-Trace: 2 Apr 2001 00:40:05 -0800, 62.58.162.210
Lines: 22
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!zeus.visi.com!news-out.visi.com!hermes.visi.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!62.58.162.210