2021-01-26 21:19:43 +0200 | received badge | ● Student (source) |
2021-01-26 21:19:39 +0200 | received badge | ● Popular Question (source) |
2018-07-12 00:01:55 +0200 | commented question | RSS feeds for questions You can find the RSS feed button for a specific question in the right side of question page (look for Question Tools). Also you can go to https://ask.sagemath.org/feeds/question/question_number/ (https://ask.sagemath.org/feeds/questi...) and replace the question_number with the number of the question. For example in this question the number is 8080, replace the question_number with 8080. |
2018-07-11 03:21:25 +0200 | asked a question | Encode and decode huffman from different scripts (Python). I am using the PIL module to get the values of each pixel from an 2x2 RGB image. (every 3 values = 1 pixel) the frequency_table(img) gives I want to encode this image with Huffman (in script client.py), save the encoded string to file and then open this file from another program (script server.py) and decode it. I learned that this is not a canonical Huffman code (from #25798 ticket i created), so i can't just use the freq to create the Huffman for the decoding. The solution i found is to get the _tree and the _index attributes from the encode object and replace them in the decode object. So the decode object will have the same _tree and _index as the encode. Is there any better solution? Sorry for my english. Thanks. |