bogdasar1985 / bitziplib Goto Github PK
View Code? Open in Web Editor NEWA library for working with Huffman Code
License: GNU Lesser General Public License v2.1
A library for working with Huffman Code
License: GNU Lesser General Public License v2.1
Will require you to do this #2
void get_code(const huffman& huf, char sym, char **res)
std::string get_code(const huffman& huf)
-fnostdlib
)/home/bogdasar/Documents/Programming/C++_Programming/HuffmanCodeLib/hf_priority_queue.cpp: In member function ‘void hf_priority_queue::shiftDown(long int)’:
/home/bogdasar/Documents/Programming/C++_Programming/HuffmanCodeLib/hf_priority_queue.cpp:58:28: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
58 | while ((2 * index + 1) < _heap.size())
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/bogdasar/Documents/Programming/C++_Programming/HuffmanCodeLib/hf_priority_queue.cpp:63:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
63 | if((right < _heap.size()) && (_heap[right] < _heap[left]))
| ~~~~~~^~~~~~~~~~~~~~
/home/bogdasar/Documents/Programming/C++_Programming/HuffmanCodeLib/hf_priority_queue.cpp: In member function ‘void hf_priority_queue::shiftDown(long int)’:
/home/bogdasar/Documents/Programming/C++_Programming/HuffmanCodeLib/hf_priority_queue.cpp:58:28: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
58 | while ((2 * index + 1) < _heap.size())
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/bogdasar/Documents/Programming/C++_Programming/HuffmanCodeLib/hf_priority_queue.cpp:63:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
63 | if((right < _heap.size()) && (_heap[right] < _heap[left]))
| ~~~~~~^~~~~~~~~~~~~~
Implementation should be write on C++ 98, be open as possible (I mean methods and variables), and could be unsafe(I mean working with memory falls on the user). User also can use methods from this implementation directly, but as a warning, we put all this in namespace called unsafe
.
Using this unsafe
namespace and aggregation, we will implement a wrapper-interface compatible with Modern C++ since C++11.
dynamic_array
is power of two, but it rule broke, when we use dynamic_array::reserve(const size_t capacity)
.dynamic_array
may not be power of two, we could fix it, by add padding field to them.Fix warnings when compiling with optimization flag level 2 or higher
Make a documentation in README.md
Serialization is not in the area of responsibility of the container class
BUILDING WRONG TREE IN DECODER!
build_tree
use huffman implementation of priority_queue
with specific policy of sorting, it should use normal policy.
Create a set of examples in a separate directory examples
Return wrong code
Not compatible with old decoder
from https://github.com/bogdasar1985/HuffmanCode
Text decoder to it reverse version
UPD: Mistake in method huffman::get_code()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.