ephtracy / voxel-model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DX,DY,DZ,I format

bnolan opened this issue · comments

Heya,

If we use x,y,z,i,... format, you can't RLE/Deflate/Brotli the output.

eg a solid run of yellow (color 8):

1,2,3,8,2,2,3,8,3,2,3,8,4,2,3,8,5,2,3,8,....

But if we use dX,dY,dZ,i format it works:

1,2,3,8,1,0,0,8,1,0,0,8,1,0,0,8,1,0,0,8,...

Since we're sending position deltas. Then you can just slap .gz on the whole file to compress real good.

Credit for the idea to @onosendai (nick from substrata)