| Yoko http://forum.yoko.com.ua/ |
|
| [X YOKO] Huffman Compression http://forum.yoko.com.ua/viewtopic.php?f=3&t=1754 |
Page 1 of 1 |
| Author: | Fonzy [ 2004-10-27 21:13:56 ] |
| Post subject: | [X YOKO] Huffman Compression |
I was trying to do a software with Visual Basic and studiing the UO protocol i've seen it uses the Huffman Compression Metod. Yoko do you have a Visual Basic port for the Compressor/Decompressor functions in Injection DLL, or maybe a dll usable with vb? |
|
| Author: | AGRS [ 2004-10-27 21:34:58 ] |
| Post subject: | |
http://uosoft.ru/renaissance/files/fclient_src.zip |
|
| Author: | Fonzy [ 2004-10-27 21:46:16 ] |
| Post subject: | |
i tried it a lot, but the class which decompress has a little bug. I've contacted the author, but no answer. The problem is that it doesn't decompress well certain strings, and it is for sure, because i tried to compress a string, decompress the result, and the obtainer string wasn't equal to the first. Any other help? It's very important for me.. |
|
| Author: | AGRS [ 2004-10-27 22:17:13 ] |
| Post subject: | |
I don't know about compress, but decompress is 100% correct. My UO Script Client is based on that decompress algoritm. |
|
| Author: | Necr0Potenc3 [ 2004-10-28 00:43:47 ] |
| Post subject: | |
dl this: http://uo.elitecoder.net/phpBB/viewtopic.php?t=281 use the exported functions... since you are using VB, set the struct pointer to NULL |
|
| Author: | Fonzy [ 2004-10-28 00:46:29 ] |
| Post subject: | |
i'm working on a client which is able to change the packets sent by the server. It's something like a proxy, it receive, modify packets, and send them to the real client. The compression i really important. In the injection.dll there is a compressor, it's written in c++. Unfortunately i'm not skilled enough to convert it in Visual Basic, and also a lot of things used in the code is natively unportable.. The best way is to use in VB a dll compiled in c++, using the Yoko Code. Only Yoko can do something like this, i hope he'll answer.. |
|
| Author: | Fonzy [ 2004-10-28 01:16:13 ] |
| Post subject: | |
Necr0Potenc3 seems what i need, but i didn't understand how to use the dll, when i try to call compress it crashes. Can you hint me how to do a packet compression, maybe with a sample? |
|
| Author: | Fonzy [ 2004-10-28 01:39:23 ] |
| Post subject: | |
This is the code i've written. Is there any error? Private Declare Sub Compress Lib "UOEncryption.dll" (Dest() As Byte, Source() As Byte, DestSize As Integer, SrcSize As Integer) Private Sub Form_Load() Dim src() As Byte, dst() As Byte String2Array "hello", src() Compress dst, src, 1000, 5 End Sub Private Function String2Array(Text, ByRef ar() As Byte) As Long On Error Resume Next ReDim ar(Len(Text) - 1) For i = 0 To Len(Text) - 1 ar(i) = Asc(Mid(Text, i + 1, 1)) Next i End Function When I run the program, VB Crashes. Any help? |
|
| Author: | Fonzy [ 2004-10-28 02:05:24 ] |
| Post subject: | |
ok, new things i've done, but still not working. There's something wrong with memory: 'IN A MODULE Public Declare Sub Compress Lib "UOEncryption.dll" (ByRef Dest() As Byte, ByRef Source() As Byte, ByRef DestSize As Integer, ByRef SrcSize As Integer) Public Src() As Byte Public Dst() As Byte Public SrcLength As Integer Public DestLength As Integer 'IN MAIN FORM Private Sub Form_Load() String2Array "ciao", Src() SrcLength = 4 DestLength = 1000 Compress Dst, Src, DestLength, SrcLength End Sub Private Function String2Array(Text, ByRef ar() As Byte) As Long On Error Resume Next ReDim ar(Len(Text) - 1) For i = 0 To Len(Text) - 1 ar(i) = Asc(Mid(Text, i + 1, 1)) Next i End Function When i run it says Error 49: Bad DLL calling convention. If i debug Src, DestLength and SrclLength, everything works, if I debug Dst it crashes saying memory could not be read. Someone can help? |
|
| Author: | Fonzy [ 2004-10-28 23:28:56 ] |
| Post subject: | |
ok I converted in VB the Necromancer Compress and Decomoress functions. All working good. Thanks to all. |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|