c1 45 aa 56 4a 49 2c 49 54 b2 8a ae 56 ca 4c 51 b2 52 4a 2a c9 2b 4e cd 4b 51 d2 51 4a 2d 4b cd 2b 01 8a 24 e7 64 26 67 2b d5 c6 02 45 4a 2a 0b 52 81 22 c5 a9 25 8e a5 25 f9 b9 89 25 99 c9 ae 20 55 c5 4a b5 00 00
(170,86,74,73,44,73,84,178,138,174,86,202,76,81,178,82,74,42,201,43,78,205,75,81,210,81,74,45,75,205,43,1,138,36,231,100,38,103,43,213,198,2,69,74,42,11,82,129,34,197,169,37,142,165,37,249,185,137,37,153,201,174,32,85,197,74,181,0,0)
{"data":[{"id":"btnsend","event":"click"}],"etype":"setAutomaticEvents"}
Dim DecData() As Byte=CompressedStreams1.DecompressBytes(DataDeflate,"zlib")
Errore nella linea: 114
java.util.zip.ZipException: incorrect header check
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at anywheresoftware.b4a.objects.streams.File.Copy2(File.java:349)
at anywheresoftware.b4a.randomaccessfile.CompressedStreams.DecompressBytes(CompressedStreams.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:64)
at b4j.example.main._elaboratewebsocket(main.java:136)
at b4j.example.main._buttondec_click(main.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA$1.run(BA.java:216)
at com.sun.javafx.application.PlatformImpl.lambda$null$177(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$178(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$152(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
No dec: (Exception) java.lang.Exception: java.util.zip.ZipException: incorrect header check
This string is the response from a browser compressed with Deflate.Using this nice tool, I'm getting different results than you:
View attachment 110164
How did you compress the string?
Maybe this thread can help you.Studying the examples on GitHub in Java it would be the java.util.zip.Deflater class. Is there a correspondent in objective-c?
I don't think I will be able to use it because I use the hosted builderMaybe this thread can help you.
Native zlib inflate/deflate for Swift 3 on iOS
I'd like to be able to inflate/deflate Swift 3 data structs. I found GzipSwift, but it's not clear how I make that available to my iOS app. The naive things I've tried include: Copying the Data+Gzip.stackoverflow.com
Maybe Erel can help?I don't think I will be able to use it because I use the hosted builder
I have already asked Erel for help many times in relation to the work I am doing, I would not like to take on all the thorny problems of my library.Maybe Erel can help?
I'm unable to uncompress the input you posted with java.util.zip.Inflater (B4J):Studying the examples on GitHub in Java it would be the java.util.zip.Deflater class. Is there a correspondent in objective-c?
Dim h As String = "c1 45 aa 56 4a 49 2c 49 54 b2 8a ae 56 ca 4c 51 b2 52 4a 2a c9 2b 4e cd 4b 51 d2 51 4a 2d 4b cd 2b 01 8a 24 e7 64 26 67 2b d5 c6 02 45 4a 2a 0b 52 81 22 c5 a9 25 8e a5 25 f9 b9 89 25 99 c9 ae 20 55 c5 4a b5 00 00"
Dim bc As ByteConverter
Dim b() As Byte = bc.HexToBytes(h.Replace(" ", ""))
Dim Inflater As JavaObject
Inflater.InitializeNewInstance("java.util.zip.Inflater", Null)
Inflater.RunMethod("setInput", Array(b))
Dim raw(100) As Byte
Inflater.RunMethod("inflate", Array(raw))
I don't know. It is managed by Jetty. You will need to do some research.Could it be related to WebSocket inflate/deflate?
Yes, I am the same, but as @Erel found it generates an error because the Header is incorrect:Could it be related to WebSocket inflate/deflate?
Pertinent RFC: https://tools.ietf.org/html/rfc7692
Code that may pertain to this: https://github.com/AnywhereSoftware...on/extensions/compress/CompressExtension.java
Caused by: java.util.zip.DataFormatException: incorrect header check