The invention discloses a self-adaptive
finite state entropy coding method, and relates to the field of
data compression. The method comprises the steps of scanning to-be-coded data to obtain a frequency set of symbols, preprocessing the frequency set, dynamically maintaining and updating the frequency set and an accumulated distribution set, and performing
adaptive coding based on a coding rule in combination with reforming
processing to obtain coded output data; establishing an initial frequency set of which the elements are all 1, reading in to-be-decoded data, performing self-adaptive decoding based on a decoding rule and in combination with inverse reforming
processing, dynamically maintaining and updating the frequency set and the cumulative distribution set, and obtaining decoded output data; and converting the alphabet set of the to-be-coded data and the alphabet set of the coded output data, and performing adaptive
finite state entropy coding on the to-be-coded data to obtainencrypted data. According to the invention, on the premise of ensuring the coding precision, the coding steps are simplified, the coding speed is improved, and the coding requirements at the present stage can be better met.