public byte[] GetData() { int data_size = 0; IntPtr data_ptr = BitStream_Native.BitStream_GetData(pointer, ref data_size); Array.Resize(ref GetData_Buffer, data_size); Marshal.Copy(data_ptr, GetData_Buffer, 0, data_size); return(GetData_Buffer); }