Buf slicing comparison / learning patch

Here’s the thread I was thinking about. Some handy bits of code here that slice up what’s needed and works out a jsui visualizer.