Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int CD_SIZE = 2;
- int USE_SIZE = 3;
- int COUNT_SIZE = 1;
- int UNKNOWN_SIZE = 5; // 5BčŹăľă¤ăş
- int LENGTH_SIZE = 1;
- int FOOTER_SIZE = 1;
- int nowPos = 0;
- byte[] Count = new byte[COUNT_SIZE];
- byte[] Length = new byte[LENGTH_SIZE];
- nowPos += CD_SIZE + USE_SIZE;
- Buffer.BlockCopy( byteData, nowPos, Count, 0, COUNT_SIZE );
- int CountSize = Convert.ToInt32( BytesConvert.ToHexString( Count ), 16 );
- nowPos += COUNT_SIZE;
- for( int i = 0; i < CountSize; i++ ) {
- nowPos += UNKNOWN_SIZE;
- Buffer.BlockCopy( byteData, nowPos, Length, 0, LENGTH_SIZE );
- int strSize = Convert.ToInt32( BytesConvert.ToHexString( Length ), 16 );
- nowPos += LENGTH_SIZE;
- byte[] ResultByte = new byte[strSize];
- Buffer.BlockCopy(byteData, nowPos, ResultByte, 0, strSize)
- nowPos += strSize + FOOTER_SIZE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement