Icon

Grid to Buffer

Taylor Dale

You must be logged in to obtain assets

Description

A set of scripts that replace the functionality of ds_grid_write/read with a buffer equivalent that provides much much smaller storage size and speed.

Works with grids that are filled with numbers only, not strings.

On average, compared to using GM's functions to write to a string, saving the grid as a buffer can make the resulting data 5-15% of its original size. That means if the size of your grid as a string takes up 1kb, your file size can be reduced to a measly 50 bytes of storage. Provides the following functions

ds_grid_write_buffer(grid[,decimals])
/* Returns a buffer. The decimals parameter is optional, if supplied and true it will store floats (decimal numbers) accurately. Otherwise if omitted or set to false, all numbers will be truncated if need be to integers.
*/
ds_grid_read_buffer(buffer) // Returns the grid back in tact

See the included test object for a working demonstration.

More Assets:

GMLVideo

SafeSave

Easy Google Analytics

WebView

End User Licence Agreement (EULA).

Age Rating: None

Version

GMS1 - Version 1.0.1. Published April 3, 2017

Fixed a typo within the demo.

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait