spike compression code