コード例 #1
0
ファイル: LZFCodec.cs プロジェクト: whztt07/battleofmages
    // Encode
    public void Encode(float[] floats, SendFunc send)
    {
        byte[] bytes = CLZF2.Compress(SnapByte.EncodeFloats(floats));

        send(bytes, bytes.Length);
    }
コード例 #2
0
ファイル: LZFCodec.cs プロジェクト: whztt07/battleofmages
    // Decode
    public float[] Decode(byte[] bytes, int encoded)
    {
        float[] floats = SnapByte.DecodeBytes(CLZF2.Decompress(bytes));

        return(floats);
    }