This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file_entropy.py | |
# | |
# Shannon Entropy of a file | |
# = minimum average number of bits per character | |
# required for encoding (compressing) the file | |
# | |
# So the theoretical limit (in bytes) for data compression: | |
# Shannon Entropy of the file * file size (in bytes) / 8 | |
# (Assuming the file is a string of byte-size (UTF-8?) characters | |
# because if not then the Shannon Entropy value would be different.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Written in Typescript (v3+). | |
* | |
* Dependencies: | |
* - rxjs >= 6 | |
* - firebase-tools >= 6 | |
* | |
* Have fun! | |
* | |
*/ |