8000 lz78: root nodes are unnecessary · Issue #15 · tudocomp/tudocomp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lz78: root nodes are unnecessary #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
koeppl opened this issue Mar 10, 2020 · 0 comments
Open

lz78: root nodes are unnecessary #15

koeppl opened this issue Mar 10, 2020 · 0 comments

Comments

@koeppl
Copy link
Member
koeppl commented Mar 10, 2020

In LZ78Compressor.hpp and LZWCompressor.hpp, the root nodes defined via the API call add_rootnode seem not necessary. Calling add_rootnode(c) just adds the character c into the LZ78 trie and gives it the LZ node ID c. Both compressors query these added nodes with get_rootnode(c), but the call always returns c. So there is no need to pollute the LZ78 tries with these 'root nodes' as the compressors can take care of these by themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0