Setting up gzip compression to optimize text throughtput
Hello,
I struggled to setup my dev cluster with gzip but it's running okay. However I cannot connect to it from .Net client. The server complains with Not in GZIP format
What do I miss?
Thanks,
Michal
BTW: The for doc .Net is not very great (since when one put's documentation in a dtd file?!? see [Network Filters |http://coherence.oracle.com/display/COH35UG/Network+Filters#]... ).
On client I have
app.config
<coherence>
<coherence-config>Config\coherence.xml</coherence-config>
<cache-config>Config\cache-config.xml</cache-config>
<pof-config>Config\pof-config.xml</pof-config>
</coherence>
cache-config.xls
<cache-config xmlns="http://schemas.tangosol.com/cache">
<caching-scheme-mapping>
<cache-mapping>
<cache-name>dist-contact-cache</cache-name>
<scheme-name>extend-direct</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<remote-cache-scheme>
<scheme-name>extend-direct</scheme-name>
<service-name>ExtendTcpCacheService</service-name>
<initiator-config>
<tcp-initiator>
<remote-addresses>
<socket-address>
<address>[name of my machine]</address>
<port>9099</port>
</socket-address>
</remote-addresses>
</tcp-initiator>
<outgoing-message-handler>
<request-timeout>30s</request-timeout>
</outgoing-message-handler>
*<use-filters><filter-name>gzip</filter-name></use-filters>*
</initiator-config>
</remote-cache-scheme>
</caching-schemes>
</cache-config>
msg from the client:
Oracle Coherence for .NET Version 3.7.0.0 Build 23256
RTC Release Build
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
2011-08-19 13:39:26.714 <D5> (thread=System.Threading.Thread): Loaded operational configuration from "FileResource(Uri = file://Config\coherence.xml, AbsolutePath = O:\bin\Debug\Config\coherence.xml)"
2011-08-19 13:39:26.714 <D5> (thread=System.Threading.Thread): Loaded cache configuration from "FileResource(Uri = file://Config\cache-config.xml, AbsolutePath = O:\bin\Debug\Config\cache-config.xml)"
2011-08-19 13:39:26.855 <D5> (thread=ExtendTcpCacheService:TcpInitiator): Started: TcpInitiator{Name=ExtendTcpCacheService:TcpInitiator, State=(Started), Codec=Tangosol.Net.Messaging.Impl.Codec, PingInterval=0, PingTimeout=30000, RequestTimeout=30000, ConnectTimeout=30000, RemoteAddresses=[10.166.110.67:9099], KeepAliveEnabled=True, TcpDelayEnabled=False, ReceiveBufferSize=0, SendBufferSize=0, LingerTimeout=-1}
2011-08-19 13:39:26.870 <D5> (thread=System.Threading.Thread): Connecting Socket to 10.166.110.67:9099
2011-08-19 13:39:26.870 <Info> (thread=System.Threading.Thread): Connected TcpClient to 10.166.110.67:9099
2011-08-19 13:39:26.917 <D5> (thread=ExtendTcpCacheService:TcpInitiator): Loaded POF configuration from "FileResource(Uri = file://Config\pof-config.xml, AbsolutePath = O:\bin\Debug\Config\pof-config.xml)"
2011-08-19 13:39:26.933 <D5> (thread=ExtendTcpCacheService:TcpInitiator): Loaded included POF configuration from "EmbeddedResource(Uri = assembly://Coherence/Tangosol.Config/coherence-pof-config.xml, AbsolutePath = assembly://Coherence/Tangosol.Config/coherence-pof-config.xml)"
2011-08-19 13:39:27.011 <Info> (thread=System.Threading.Thread): Error establishing a connection with 10.166.110.67:9099: Tangosol.Net.Messaging.ConnectionException: TcpConnection(Id=, Open=True, LocalAddress=0.0.0.0:3551, RemoteAddress=10.166.110.67:9099)
2011-08-19 13:39:27.011 <Error> (thread=System.Threading.Thread): Error while starting service "ExtendTcpCacheService": Tangosol.Net.Messaging.ConnectionException: could not establish a connection to one of the following addresses: [10.166.110.67:9099]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor
2011-08-19 13:39:27.026 <D5> (thread=ExtendTcpCacheService:TcpInitiator): Stopped: TcpInitiator{Name=ExtendTcpCacheService:TcpInitiator, State=(Stopped), Codec=Tangosol.Net.Messaging.Impl.Codec, PingInterval=0, PingTimeout=30000, RequestTimeout=30000, ConnectTimeout=30000, RemoteAddresses=[10.166.110.67:9099], KeepAliveEnabled=True, TcpDelayEnabled=False, ReceiveBufferSize=0, SendBufferSize=0, LingerTimeout=-1}
Unhandled Exception: Tangosol.Net.Messaging.ConnectionException: could not establish a connection to one of the following addresses: [10.166.110.67:9099]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor
My server config is
config\tangosol-coherence-override.xml
<?xml version="1.0"?>
<!DOCTYPE coherence SYSTEM "coherence.dtd">
<coherence>
<cluster-config>
*<filter>*
*<filter-name>gzip</filter-name>*
*<filter-class>com.tangosol.net.CompressionFilter</filter-class>*
*<init-params>*
*<init-param>*
*<param-name>strategy</param-name>*
*<param-value>gzip</param-value>*
*</init-param>*
*<init-param>*
*<param-name>level</param-name>*
*<param-value>speed</param-value>*
*</init-param>*
*</init-params>*
*</filter>*
</cluster-config>
</coherence>
and config/contact-cache-config.xml
<cache-config>
<defaults>
<serializer>pof</serializer>
</defaults>
<caching-scheme-mapping>
<cache-mapping>
<cache-name>dist-*</cache-name>
<scheme-name>dist-default</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>repl-*</cache-name>
<scheme-name>repl-default</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>aspnet-session-storage</cache-name>
<scheme-name>aspnet-session-scheme</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>aspnet-session-overflow</cache-name>
<scheme-name>aspnet-session-overflow-scheme</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<distributed-scheme>
<scheme-name>aspnet-session-scheme</scheme-name>
<scheme-ref>dist-default</scheme-ref>
<service-name>AspNetSessionCache</service-name>
<backing-map-scheme>
<local-scheme>
<class-name>com.tangosol.net.cache.LocalCache</class-name>
<listener>
<class-scheme>
<class-name>
com.tangosol.net.internal.AspNetSessionStoreProvider$SessionCleanupListener
</class-name>
<init-params>
<init-param>
<param-type>com.tangosol.net.BackingMapManagerContext</param-type>
<param-value>{manager-context}</param-value>
</init-param>
</init-params>
</class-scheme>
</listener>
</local-scheme>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
<distributed-scheme>
<scheme-name>aspnet-session-overflow-scheme</scheme-name>
<scheme-ref>dist-default</scheme-ref>
<service-name>AspNetSessionCache</service-name>
<autostart>true</autostart>
</distributed-scheme>
<distributed-scheme>
<scheme-name>dist-default</scheme-name>
<backing-map-scheme>
<local-scheme/>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
<replicated-scheme>
<scheme-name>repl-default</scheme-name>
<backing-map-scheme>
<local-scheme/>
</backing-map-scheme>
<autostart>true</autostart>
</replicated-scheme>
<proxy-scheme>
<service-name>ExtendTcpProxyService</service-name>
<thread-count>5</thread-count>
<acceptor-config>
<tcp-acceptor>
<local-address>
<address>localhost</address>
<port>9099</port>
</local-address>
</tcp-acceptor>
*<use-filters><filter-name>gzip</filter-name></use-filters>*
</acceptor-config>
<autostart>true</autostart>
</proxy-scheme>
</caching-schemes>
</cache-config>
And I get
2011-08-19 13:39:27.008/7012.815 Oracle Coherence GE 3.7.0.0 <Error> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor, me
mber=2): An exception occurred while decoding a Message for Service=Proxy:ExtendTcpProxyService:TcpAcceptor received fro
m: TcpConnection(Id=null, Open=true, LocalAddress=10.166.110.67:9099, RemoteAddress=10.166.110.54:3551): java.io.IOExcep
tion: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:143)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67)
at com.tangosol.net.CompressionFilter.getInputStream(CompressionFilter.java:57)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:54)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
at java.lang.Thread.run(Thread.java:662)
Edited by: 880448 on Aug 19, 2011 10:58 AM
Edited by: 880448 on Aug 19, 2011 11:07 AM
in .Net I have app.config file which specifies which .xml files are used. At least that's how the Coherence.Net example is configured. Basically I would like to know the schema for Config\coherence.xml referenced in app.config.
As the documentation http://download.oracle.com/docs/cd/E15357_01/coh.360/e15726/net_netfilters.htm#sthref213 states:
|"There are two steps to configuring a filter." The first is to declare the filter in the <filters> XML element of the cache |factory configuration file. This is illustrated in Example 23-2:
|
|Example 23-2 Configuring a Filter
|
|<coherence>
| <cluster-config>
| <filters>
| <filter>
| <filter-name>gzip</filter-name>
| <filter-class>Tangosol.Net.CompressionFilter, Coherence</filter-class>
| </filter>
| </filters>
| </cluster-config>
|...
|</coherence>
1) It is really unclear whether it should be done on client or on the proxy!!! 2) Just pasting this into coherence.xml does not work with client complaining on "Could not find schema information for the element 'coherence'" This example is clearly wrong by not specifying the name of XML schema...
|The second step is to attach the filter to one or more specific services. To specify the filter for a specific service, for |example the ExtendTcpCacheService service, add a <filter-name> element to the <use-filters> element of the service |declaration in the cache configuration file.
|
|Example 23-3 Attaching a Filter to a Service
|
|<remote-cache-scheme>
| <scheme-name>extend-direct</scheme-name>
| <service-name>ExtendTcpCacheService</service-name>
| <initiator-config>
| ...
| <use-filters>
| <filter-name>gzip</filter-name>
| </use-filters>
|
| ...
|</remote-cache-scheme>
I am pretty sure it's on the client as that's where my <tcp-initiator> and then <address> of my cluster proxy is. theoretically these "two steps" should be easy...
Similar Messages
-
Enabling GZIP compression on the HTTPBC or a suggested alternative approach
Hi,
I posted this on the openusb-users group, but I haven't come up with a good solution yet.
Any takers?
Thanks,
Rob
http://openesb-users.794670.n2.nabble.com/gzip-compression-support-in-HTTP-BC-tp5366301.html
Does anybody know whether the HTTP BC shares all of the same features that the Glassfish HTTP listener supports such as gzip compression? If so, where are those parameters specified for the HTTP BC? (Compression of the XML can of course make a tremendous bandwidth savings for the typical XML passed around via SOAP.)
Please see:
http://docs.sun.com/app/docs/doc/820-4338/abhco?a=view
compression - on
Specifies use of HTTP/1.1 GZIP compression to save server bandwidth. Allowed values are:
off Disables compression.
on Compresses data.
force Forces data compression in all cases.
positive integer Specifies the minimum amount of data required before the output is compressed.
If the content-length is not known, the output is compressed only if compression is set to on or force.
compressableMimeType text/html,text/xml,text/plain
Specifies a comma-separated list of MIME types for which HTTP compression is used.
If there isn't a way to configure the HTTPBC, What would be the best way to enable a gzip compression of the XML for the HTTPBC or JBI framework in general?
My first approach might be to just have a Glassfish HTTP-Listener based WebService delegate to the HTTPBC or more directly to the JBI SE components if possible. Maybe a filter on the HTTPBC to gzip the payload? Are there any plans to refactor HTTPBC to use the Glassfish HTTP Listener code, it appears to have more capability and options?
RobI tried it did not work.
Below are the steps which I did:
Test2: Table level compression test
===================================
CREATE TABLE SCOTT.TEST_PMT_TAB_COMP
PMT_ID INTEGER NOT NULL,
PMT_AGCY_NBR CHAR(7 BYTE),
PMT_SBAGCY_NBR CHAR(7 BYTE),
PMT_PAY_DT DATE,
PMT_POL_NBR CHAR(14 BYTE),
PMT_POL_SEQ_NBR CHAR(2 BYTE),
PMT_PRM_INSD_NM VARCHAR2(30 BYTE),
PMT_PAY_TYP_DESC VARCHAR2(20 BYTE),
PMT_PAY_AMT NUMBER(11,2),
PMT_POST_DT DATE
COMPRESS FOR ALL OPERATIONS;
inserting record from the test table:
SQL> insert into SCOTT.TEST_PMT_TAB_COMP select * from SCOTT.TEST_PMT;
5051013 rows created.
SQL> commit;
Commit complete.
SQL> select count(*) from scott.TEST_PMT_TAB_COMP;
COUNT(*)
5051013
Checking size:
SQL> select bytes/1024/1024, segment_name, owner, segment_type, tablespace_name from dba_segments where segment_name='TEST_PMT_TAB_COMP';
BYTES/1024/1024 SEGMENT_NAME OWNER SEGMENT_TYPE TABLESPACE_NAME
776 TEST_PMT_TAB_COMP SCOTT TABLE USERS_DATA01
SQL> select owner, table_name, COMPRESSION, COMPRESS_FOR from dba_tables where table_name='TEST_PMT_TAB_COMP';
OWNER TABLE_NAME COMPRESS COMPRESS_FOR
SCOTT TEST_PMT_TAB_COMP ENABLED OLTP
Now it is occupying more size. -
Adobe Air needs HTTP gzip compression
Hello
We are developing an Adibe Air application. We use SOAP for
service calls and we depend entirely upon gzip HTTP compression to
make the network performance even vaguely acceptable. SOAP is such
a fat format that it really needs gzip compression to get the
responses down to a reasonable size to pass over the Internet.
Adobe Air does not currently support HTTP gzip compression
and I would like to request that this feature be added ASAP. We
can't release our application until it can get reasonable network
performance through HTTP gzip compression.
Thanks
AndrewHi blahxxxx,
Sorry for the slow reply -- I wanted to take some time to try
this out rather than give an incomplete response.
It's not built into AIR, but if you're using
Flex/ActionScript for your application you can use a gzip library
to decompress a gzipped SOAP response (or any other gzipped
response from a server -- it doesn't have to be SOAP). Danny
Patterson gives an example of how to do that here:
http://blog.dannypatterson.com/?p=133
I've been prototyping a way to make a subclass of the Flex
WebService class that has this built in, so if I can get that
working it would be as easy as using the Flex WebService component.
I did some tests of this technique, just to see for myself if
the bandwidth savings is worth the additional processing overhead
of decompressing the gzip data. (The good news is that the
decompression part is built into AIR -- just not the specific gzip
format -- so the most processor-intensive part of the gzip
decompression happens in native code.)
Here is what I found:
I tested this using the
http://validator.nu/ HTML validator
web service to validate the HTML source of
http://www.google.com/. This
isn't a SOAP web service, but it does deliver an XML response
that's fairly large, so it's similar to SOAP.
The size of the payload (the actual HTTP response body) was
5321 bytes compressed, 45487 bytes uncompressed. I ran ten trials
of each variant. All of this was done in my home, where I have a
max 6Mbit DSL connection. In the uncompressed case I measured the
time starting immediately after sending the HTTP request and ending
as soon as the response was received. In the compressed case I
started the time immediately after sending the HTTP request and
ended it after receiving the response, decompressing it and
assigning the compressed content to a ByteArray (so the compressed
case times include decompression, not just download). The average
times for ten trials were:
Uncompressed (text) response: 1878.6 ms
Compressed (gzip) response: 983.1
Obviously these will vary a lot depending on the payload
size, the structure of the compressed data, the speed of the
network, the speed of the computer, etc. But in this particular
case there's obviously a benefit to using gzipped data.
I'll probably write up the test I ran, including the source,
and post it on my blog. I'll post another reply here once I've done
that. -
How Do I enable gzip compression on Sun One Web Server 6.0
How Do I enable gzip compression on Sun One Web Server 6.0
Hi,
Sun ONE webserver 6.0 is over 5 years old and is reaching end of support life. Please consider upgrading to webserver 6.1sp5 which is free:
http://www.sun.com/download/products.xml?id=434aec1d
or else the preview version of WebServer 7.0 (also free)):
http://www.sun.com/download/products.xml?id=446518d5
For webserver 6.1, the docs for setting up compression are at:
http://docs.sun.com/source/819-0130/agcontnt.html#wp1019634
and
http://docs.sun.com/source/817-6252/npgnsapi.html
Hope this helps -
Discoverer Servlet with Web Cache gzip Compression
Hi,
we have some Discoverer Worksheets which we want to access by ISDN dial in (64 kbit/sec). To speed up the response time when users use this slow connection, we want to activate Web Cache gzip compression.
But even when we enable Web Cache for Discoverer (configuration.xml), Web Cache don't compress pages generated by Discoverer Viewer. We found out that the generated responses contain the "content-disposition" HTTP-Header entry. Are we correct that this is the reason why there is no gzip compression? AND DOES ANYONE KNOW A WORKAROUND???
Best regards,
Matthias SchererWhen you set the caching rules, you can also specify whether or not you want the pages to be compressed. Web Cache compresses html pages and relies on the accept-encoding: gzip from the client header to determine whether or not to send the content compressed.
-
Gzip compression for http responses?
Is there an easy way to have the WebLogic server compress HTTP responses, something like Tomcat's "compression" parameter (see http://tomcat.apache.org/tomcat-6.0-doc/config/http.html)? Or is the only way to write a servlet filter?
Thanks,
--DanHi,
I'm not aware of any GZip compression on WLS, but if you're using WLS 10.3, you may add the following block to your weblogic.xml :
<weblogic-web-app>
<jsp-descriptor>
<compress-html-template>
true
</compress-html-template>
</jsp-descriptor>
</weblogic-web-app>
It's HTML Compression and it should remove any extra spaces.
Example :
<html>
<body>
<text>
</text>
</body>
</html>
Can be compressed as:
<html><body><text></text></body></html>
That's the only thingl that comes to my mind.
Hope this helps. -
GZip Compression (Yes this old chestnut Again)
I have a client who requires this to work in .NET 4 Client Profile so no 4.5 compression improvements for me. All I need is 2 functions one to compress and one to decompress
both of which take in and return unicode strings. I have spent weeks nay months searching tweaking writing etc. to no avail, I have looked at all the existing snippets I could find but they
all either take in or return a Byte() or Stream or something else and when I tweak them to take/return a string they don't work. What I have so far (a snippet found online tweaked) is:
Public Shared Function Decompress(bytesToDecompress As String) As String
Using stream = New IO.Compression.GZipStream(New IO.MemoryStream(System.Text.Encoding.Unicode.GetBytes(bytesToDecompress)), IO.Compression.CompressionMode.Decompress)
Const size As Integer = 4096
Dim buffer = New Byte(size - 1) {}
Using memoryStream = New IO.MemoryStream()
Dim count As Integer
Do
count = stream.Read(buffer, 0, size)
If count > 0 Then
memoryStream.Write(buffer, 0, count)
End If
Loop While count > 0
Return System.Text.Encoding.Unicode.GetString(memoryStream.ToArray())
End Using
End Using
End Function
Public Shared Function Compress(Input As String) As String
Dim bytes() As Byte = System.Text.Encoding.Unicode.GetBytes(Input)
Using stream = New IO.MemoryStream()
Using zipStream = New IO.Compression.GZipStream(stream, IO.Compression.CompressionMode.Compress)
zipStream.Write(bytes, 0, bytes.Length)
Return System.Text.Encoding.Unicode.GetString(stream.ToArray())
End Using
End Using
End Function
However the problem is if you run the following you get nothing out.
Decompress(Compress("Test String"))
Please help me; I know this has been covered to death elsewhere but I am missing something when tweaking I am sure it's something very simple but it is causing me great stress! Many Many Thanks Indeed!I have now found a workaround which may be useful to others so I am posting it here, it doesn't do exactly what was described above which would be ideal but here is the code:
Private Sub WriteCompressed(ByVal Path As String, Data As String)
Using WriteFileStream As IO.FileStream = IO.File.Create(Path)
Using DataStream As New IO.MemoryStream(System.Text.Encoding.Unicode.GetBytes(Data))
Using Compressor As IO.Compression.DeflateStream = New IO.Compression.DeflateStream(WriteFileStream, IO.Compression.CompressionMode.Compress)
DataStream.CopyTo(Compressor)
End Using
End Using
End Using
End Sub
Private Function ReadCompressed(ByVal Path As String) As String
Using ReadFileStream As IO.FileStream = System.IO.File.OpenRead(Path)
Using DataStream As New IO.MemoryStream
Using Decompressor As IO.Compression.DeflateStream = New IO.Compression.DeflateStream(ReadFileStream, IO.Compression.CompressionMode.Decompress)
Decompressor.CopyTo(DataStream)
Return System.Text.Encoding.Unicode.GetString(DataStream.ToArray)
End Using
End Using
End Using
End Function
Many thanks indeed to everyone who helped and any more input is still welcome. Thanks again!
That's great. You should propose your post as the answer to end the thread.
I just finished with a different method. However I will guess the real issue is that strings can not contain various binary values such as Nulls, Delete, Bell, Backspace, etc (as you can see zeros in RTB2 in the image below which are null
values).
I forgot to add that during testing I was receiving errors because compressed data written to a string then read from a string into bytes and decompressed would return errors during the decompressing that the data did not contain a valid GZip header. Therefore
when GZip compresses it uses some format for the compressed data that is known to Gzip. Otherwise it would not have a header in the compressed data.
You can see what binary values (Decimal) would be in a string at this link
Ascii Table.
Therefore I used the code below to get a string from a RichTextBox1 to a byte array. That is compressed and output to a byte array.
The information in the "compressed" byte array is then converted byte by byte to the bytes value in RichTextBox2 with each value separated by a comma.
To decompress the string in RichTextBox2 that text is split into a string array on a comma. Then each item is converted to a byte into a List(Of Byte). The List(Of Byte).ToArray is then decompressed back into a byte array and that byte array is converted
to a string in RichTextBox3.
I suspect the actual compressed byte array could be written to a binary file using the
BinaryWriter Class if the original strings were supposed to be compressed and attached as files for transfer somewhere.
Option Strict On
Imports System.IO
Imports System.IO.Compression
Imports System.Text
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Location = New Point(CInt((Screen.PrimaryScreen.WorkingArea.Width / 2) - (Me.Width / 2)), CInt((Screen.PrimaryScreen.WorkingArea.Height / 2) - (Me.Height / 2)))
RichTextBox1.Text = My.Computer.FileSystem.ReadAllText("C:\Users\John\Desktop\Northwind Database.Txt")
Label1.Text = "Waiting"
Label2.Text = "Waiting"
Label3.Text = "Waiting"
Label4.Text = "Waiting"
Button2.Enabled = False
End Sub
Dim BytesCompressed() As Byte
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
RichTextBox2.Clear()
RichTextBox3.Clear()
Label1.Text = "Waiting"
Label2.Text = "Waiting"
Label3.Text = "Waiting"
Label4.Text = "Waiting"
If RichTextBox1.Text <> "" Then
Dim uniEncoding As New UnicodeEncoding()
BytesCompressed = Compress(uniEncoding.GetBytes(RichTextBox1.Text))
Label1.Text = RichTextBox1.Text.Count.ToString
Label2.Text = BytesCompressed.Count.ToString
For Each Item In BytesCompressed
RichTextBox2.AppendText(CStr(CInt(Item)) & ",")
Next
RichTextBox2.Text = RichTextBox2.Text.Remove(RichTextBox2.Text.Count - 1, 1)
End If
Button2.Enabled = True
End Sub
Private Shared Function Compress(data As Byte()) As Byte()
Using compressedStream = New MemoryStream()
Using zipStream = New GZipStream(compressedStream, CompressionMode.Compress)
zipStream.Write(data, 0, data.Length)
zipStream.Close()
Return compressedStream.ToArray()
End Using
End Using
End Function
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Button2.Enabled = False
Dim RTB2Split() As String = RichTextBox2.Text.Split(","c)
Dim BytesToUse As New List(Of Byte)
For Each Item In RTB2Split
BytesToUse.Add(CByte(Item))
Next
Label3.Text = BytesToUse.Count.ToString
Dim uniEncoding As New UnicodeEncoding()
RichTextBox3.Text = uniEncoding.GetString(Decompress(BytesToUse.ToArray))
Label4.Text = RichTextBox3.Text.Count.ToString
End Sub
Private Shared Function Decompress(data As Byte()) As Byte()
Using compressedStream = New MemoryStream(data)
Using zipStream = New GZipStream(compressedStream, CompressionMode.Decompress)
Using resultStream = New MemoryStream()
zipStream.CopyTo(resultStream)
Return resultStream.ToArray()
End Using
End Using
End Using
End Function
End Class
La vida loca -
Reverse Proxy Server and gzip compressed pages
Hi ALL!
Does Proxy Server in reverse proxy configuration works with gzip compressed pages? How it will serve different browser versions which are supports compression differently.
Thanks. Happy New Year!Hi,
Domain relaxing will not work in this setting, ref. RFC 2109 http://www.ietf.org/rfc/rfc2109.txt
What you need to do is to create a DNS alias for the portal on domain [something].[company].com. Then create a portal component which returns the MYSAPSSO2 cookie and create an URL iView for it with the DNS alias hostname and add it to the default framework page. In this way, persons logging in will get the MYSAPSSO2 cookie for both domains [sap subdomain].[network domain].local and [network domain].[company].com
Regards
Dagfinn -
Gzip compression issues from using a proxy?
Hello I am unable to load some websites now from suspected gzip compression issues? I have been using a proxy and now my firefox browser is messed up Plz Help [email protected]
ThanksIt is possible to autenticate to a proxy server, but the question is what tye of authentication your proxy is carrying out . "Basic" or "digest".If it is Basic then you can use Base64 authentication scheme. You have to first set the System property variable to find proxy server (like port and IP Address)
-
Is it possible to enable Web Cache gzip compression with 9iAS Disco Viewer?
Hi,
Sorry for repeating this question. But it's very urgent and we don't have any idea yet how to solve / work around it:
To keep it short: Is it possible to use Web Cache gzip compression for pages rendered by 9iAS Discoverer Viewer???
Our scenario: We have some Discoverer Worksheets which we want to access by ISDN dial in (64 kbit/sec). An average page needs 2 minutes only for sending the html/javascript output rendered by Disco Viewer to the client browser.
To speed up the response time when users use this slow connection, we want to activate Web Cache gzip compression.
The problem: But even when we enable Web Cache for Discoverer (configuration.xml and Web Cache rules), Web Cache doesn't compress pages generated by Discoverer Viewer. We found out that the generated responses contain the "content-disposition" HTTP-Header entry. Are we correct that this is the reason why there is no gzip compression? AND DOES ANYONE KNOW A WORKAROUND (p.e. configure Disco not to add the content-disposition http header)???
Best regards,
Matthias SchererWhen you set the caching rules, you can also specify whether or not you want the pages to be compressed. Web Cache compresses html pages and relies on the accept-encoding: gzip from the client header to determine whether or not to send the content compressed.
-
How do I set up my @me account to text on my phone?
How do I set up a me account or text from my macbook pro?
Hi there,
You may want to take a look at the article below for more information on the requirements for iMessage and how to set it up.
iOS: Using Messages
http://support.apple.com/kb/ht3529
Hope that helps,
Griff W. -
How to set the Background Color of a Text Field in a Tabular Report.
Hello,
I tried to set the Background Color of a Text Field in a Tabular Report.
But I was not able to change this colur.
In the report attributes --> column attributes
I tried already:
1. Column Formating -- >CSS Style (bgcolor: red)
2. Tabular Form Element --> Element Attributes (bgcolor: red)
but nothing worked.
Can anybody help me?
I Use Oracle Apex 2.2.1 on 10gR2
thank you in advance.
Oliverin "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
style="background-color:red;"
I will also check if there is a way to do this via the template and post here again
edit:
in your template definition, above the template, enter the following:
< STYLE TYPE="text/css" >
.class INPUT {background-color:red;}
< /STYLE >
(remove the spaces after the < and before the >)
change "class" to the class that the template is calling
(I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
Message was edited by:
TheJosh -
GZIP Compression Issue in Weblogic 8.1
Has anyone experienced issues with gzip compression filtering in 8.1?
After about 2 months of dev. and testing with the filter, a bug has been found
in our portal, and I have traced it back to the filter that I downloaded from
dev2dev code and utilities.
It is strange. The only time I see an issue is when a user clicks the "back button"
in the browser itself to go back to a previous page, AND then clicks a link (for
example) in a portlet that is tied to an action in a jpf for that portlet. The
error only happens for actions in a portlet that are local to that portlet (no
forwarding to other portlets or anything fancy)...just pure "local internal forwards."
If you do this, USING THE BACK BUTTON to get back to this page with the portlet,
when you click the action, you are actually taken to the page where you were when
you clicked the back button.
I have re-created this is simple portals that have no content, so I know it is
not something else I introduced.
Any ideas? Maybe it is the filter-mapping pattern I am using??? I am currently
mapping on *.portal, but this is the only situation that seems to break.For those interested, I have some updates on this subject and someone out there sent me a mail asking if I ever found anything out.
Basically, when I encountered this issue the first time, I was working on a SP2 Portal. We were having numerous small bugs like this one with SP2 that centered around the back button or refresh button. BEA gave us a "super patch" back in July or so that when applied to our SP2 project, fixed our issue. I have sense moved onto SP3, and I did not see the compression issue (so I think SP3 must have the patches correctly setup...like I would assume it would). -
Set the exact position of a text or variable
Dear All !
How can I set the exact position of a text (absolute) in SAPScript
like "write" command's positional possibility.
e.g
WRITE: /3 'Name', 15 , 30 'RoomNo', 45 'Age'.
Regards
IlhanHi,
WRITE: /3 'Name', 15 'XXX' , 30 'RoomNo', 45 'Age'.
This will work.......
Check out........
Regards,
Priyanka. -
How do i set up or remove pre-emptive text?
how do i set up and remove pre-emptive text?
== This happened ==
Every time Firefox openedThe Mail app does not provide that funtion. Check with your email provider. They may provide such a feature through a web interface.
Maybe you are looking for
-
How to get a row level share lock
Is it possible to acquire a row-level share lock, which would do all of the following? 1. Prevent others from updating that row. 2. Allow others to read that row. 3. Allow others to update other rows in the same table. I have the following scenario w
-
HP Pavillion DV7 notebook PC Windows 7 64 intel I5 6 gig memory service pack 1 I am trying to identify a problem with my HP Pavillion dv7 laptop Several months ago it started getting hot and showing messages about problems with the internal fan and b
-
Ultra 10 not writing to path_to_inst
Hello I have a Ultra 10 system, Solaris 8, 64-bit. I installed an Antares gigabit quad card and for some reason its not writing to the /etc/path_to_inst file. I installed the package and the package is showed doing a pkginfo. Issueing the command prt
-
WRT54G3G-ST ... new firmware to support current cards?
I own a WRT54G3G router that a sprint air card plugs into the top of. I love the router so much I got another one and setup another card with sprint. The bad news is that none of the wireless cards currently offered are on the supported list. I took
-
How many versions ca be created
Sir, In version control for po how many versions can be created for a po regards amey