Skip to content

Commit 2c279c4

Browse files
committed
feat: Add PPM (Prediction by Partial Matching) algorithm implementation
- Implemented the PPM algorithm for data compression and decompression. - Added methods for updating the model, encoding, and decoding symbols. - Included utility functions for reading from files and testing the algorithm. - Verified functionality with various datasets to ensure accuracy. This addition enhances the repository's collection of Python algorithms.
1 parent 2f37ee9 commit 2c279c4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compression/ppm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import sys
33
from collections import defaultdict
44

5+
#Description for the ppm algorithm can be found at https://en.wikipedia.org/wiki/Prediction_by_partial_matching
56

67
class PPMNode:
78
def __init__(self) -> None:

0 commit comments

Comments
 (0)