A datamosh is what happens when you put new data into a custom Hash structure that is designed to accommodate collisions by finding a new spot for old colliding data. You put in the new data, there's a collision, and your function attempts to do a secondary put on the discovered colliding data, but finds collision with that too and keeps trying and failing to put the data. Then, when the stack has almost completely unraveled and everything has been shifted, the original function tries to put the new data into its place again but discovers that the collision resolution algorithm put something else there. So it starts all over ...