MIDI compression and decompression methods that reduce the size of a
standard MIDI file and maintains information to play the MIDI music. The
exemplary method of the invention makes use of the high correlation and
repetitions between a look-ahead MIDI event and previous set of MIDI
events. An adjustable size Lempel-Ziv-like MIDI Event Search Window
(MESW) is created during the compression and decompression process to
allow searching of matched events or event elements in previous window
size of MIDI events. Further reduction of the MIDI events can be made by
discarding the matched events in the event search window. Therefore, with
4-bit of MIDI event search window, the number of MIDI events stored in
the window can be more than 16.