Moderator: Moderators
-
foux
- Posts: 11
- Joined: 2004-03-21 04:41
Post
by foux » 2004-03-21 04:46
Hello,
Would anybody have an example of He3 encoding/decoding in Java, or a describe He3 algorythm
Thanks
foux
-
foux
- Posts: 11
- Joined: 2004-03-21 04:41
Post
by foux » 2004-03-21 05:15
Thanks for your reply. Unfortunately, this code isn't making any compression, I would even say that it makes and expansion, due to the fact that It didn't compress any data, and writes additional infos
If someone have another algorithm/source code?
-
Twink
- Posts: 436
- Joined: 2003-03-31 23:31
- Location: New Zealand
Post
by Twink » 2004-03-21 07:51
foux wrote:Thanks for your reply. Unfortunately, this code isn't making any compression, I would even say that it makes and expansion, due to the fact that It didn't compress any data, and writes additional infos
If someone have another algorithm/source code?
Can you try be alittle more clear?
from the look at the java source it appears to be Huffman encoding (or an alternate) having both encoding and decoding functions, and it looks pretty much correct from the read through I just did.
-
Twink
- Posts: 436
- Joined: 2003-03-31 23:31
- Location: New Zealand
Post
by Twink » 2004-03-21 07:55
erm ok maybe I was wrong, having another look at the source makes me think its doing something rather weird if not totally wrong in the encode function, and if the decoder decodes that then I guess it might be alittle off too, but then again I am tired could be wrong yet again.
-
foux
- Posts: 11
- Joined: 2004-03-21 04:41
Post
by foux » 2004-03-21 08:06
In fact, If I'm not mistaken, the decoder worls correctly. The encoder also works correctly but it is making a Huffman tree considering all entries has the same frequency, so it's just encoding without reducing the size (I might be wrong but I think it's what is done)
-
foux
- Posts: 11
- Joined: 2004-03-21 04:41
Post
by foux » 2004-03-21 10:45
Because I'm writing a DC Client in Java with a friend (more for the fun than anything else) and we can't figure how to creates those DcLst files.
-
Todi
- Forum Moderator
- Posts: 699
- Joined: 2003-03-04 12:16
-
Contact:
Post
by Todi » 2004-03-21 11:09
I think i heard somewhere that the DcLst's arn't actually done with a full huffman encoding, but it's some kind of strange semi-huffman... But that's only hearsay.
-
ivulfusbar
- Posts: 506
- Joined: 2003-01-03 07:33
Post
by ivulfusbar » 2004-03-21 11:11
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.
-
foux
- Posts: 11
- Joined: 2004-03-21 04:41
Post
by foux » 2004-03-21 11:14
In fact, I've already looked at a lot of different source codes, and I've managed to construct the He3 tree correctly, but the problem is to write the tree to a file. All others sources files I've seen are using unsigned bytes or such things not available in Java. I'm kind of stuck here
-
TheParanoidOne
- Forum Moderator
- Posts: 1420
- Joined: 2003-04-22 14:37
Post
by TheParanoidOne » 2004-03-21 11:56
I don't know anything about the technical correctness of the code as I don't really know how DCLst's are created. I do know however that DCLst's based on this code can be opened correctly using DC++ with no visible problems.
YMMV, I guess.
-
TheParanoidOne
- Forum Moderator
- Posts: 1420
- Joined: 2003-04-22 14:37
Post
by TheParanoidOne » 2004-03-22 20:24
TheParanoidOne wrote:I do know however that DCLst's based on this code can be opened correctly using DC++ with no visible problems.
Upon further inspection, it seems that while this statement is still true, examining the contents of the file produced shows that the encoding is definitely screwy.