Optimal trellis-based buffered compression and fast approximations | Synapse