-
Notifications
You must be signed in to change notification settings - Fork 1
Proposed Algorithm
/* Compression algorithm for Lempel Ziv Bit Masking Hidden Markov (LZBMHM) /
Begin
// Step 1: inputs sent
// Step 2: dictionary based
if(contents exist)
output(index(word length, next symbol from the input)
continue
else
no input found
exit
// Step 3: bitmasking
Begin
// Step I: mask patterns
Begin
SlidingMask1=1ms; SlidingMask2=2ms; FixedMask1=1mf; FixedMask2=2mf
CompressionRatio=100
for each mask m1 in (1ms, 2ms, 1mf, 2mf)
for each mask m2 in (1ms, 2ms, 1mf, 2mf)
compress=use with [m1,m2]
if(compress < CompressionRatio)
then CompressionRatio=compress
SlidingMask1=m1; SlidingMask2=m2
endif
endfor
endfor
return SlidingMask1, SlidingMask2
End
// Step II: bitmask dictionary
Begin
// Step a: Graph representation
G=(V,E)
for each node(V) is an unique number
where edge(E) represents bitmask that matches nodes
endfor
// Step b: Allocating to nodes and edges
/ Frequency are bit savings present in nodes /
/ Masks are bit savings from the edges */
// Step c: Calculating the bit savings distribution of all nodes
// Step d: Selection of the best node N
// Step e: Remove N from G and insert into dictionary
for each node N1 in G that is connected to N
if(N1 < threshold)
then remove N1 from G
endif
endfor
// Step f: Repeat steps c to e until dictionary gets full or G gets empty
return dictionary
End
End
// Step 4: Compressed Code
// Conversion into compressed code from linear transformation, vector quantization and hidden markov
End