mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2024-09-29 18:59:05 +00:00
Compress the precomputed edit_distance arrays
This commit is contained in:
parent
f07cabafb7
commit
696eb61bf4
Binary file not shown.
BIN
transcoder/edit_distance.pickle.bz2
Normal file
BIN
transcoder/edit_distance.pickle.bz2
Normal file
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
import bz2
|
||||
import functools
|
||||
import pickle
|
||||
from typing import Iterable
|
||||
@ -239,7 +240,9 @@ def main():
|
||||
|
||||
# TODO: error distance matrices
|
||||
|
||||
with open("transcoder/edit_distance.pickle", "wb") as out:
|
||||
with bz2.open(
|
||||
"transcoder/edit_distance.pickle.bz2", "wb",
|
||||
compresslevel=9) as out:
|
||||
pickle.dump(
|
||||
edit, out, protocol=pickle.HIGHEST_PROTOCOL)
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
"""Various representations of Apple II video display."""
|
||||
|
||||
import bz2
|
||||
import functools
|
||||
import pickle
|
||||
from typing import Union
|
||||
@ -141,7 +142,7 @@ class DHGRBitmap:
|
||||
|
||||
# Load edit distance matrices for masked, shifted byte 0..3 values
|
||||
# TODO: should go somewhere else since we don't use it here at all
|
||||
with open("transcoder/edit_distance.pickle", "rb") as ed:
|
||||
with bz2.open("transcoder/edit_distance.pickle.bz2", "rb") as ed:
|
||||
edit_distances = pickle.load(ed)
|
||||
|
||||
def __init__(self, main_memory: MemoryMap, aux_memory: MemoryMap):
|
||||
|
Loading…
Reference in New Issue
Block a user