gm().stream() and gm().toBuffer()

still need to add tests for `gm().toBuffer()`