Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- byte[] buff = null;
- FileStream fs = new FileStream("D:\\r.mp3.out.gz",
- FileMode.Open,
- FileAccess.Read);
- BinaryReader br = new BinaryReader(fs);
- long numBytes = new FileInfo("D:\\r.mp3.out.gz").Length;
- buff = br.ReadBytes(10);
- byte flags = buff[3];
- byte MASK_ASCII = 0xFF;
- byte MASK_FTEXT = 0x01;
- byte MASK_FHCRC = 0x02;
- byte MASK_FEXTRA = 0x04;
- byte MASK_FNAME = 0x08;
- byte MASK_FCOMMENT = 0x10;
- if ((flags & MASK_FNAME) != 0)
- {
- //blah
- while (br.ReadChar() != 0)
- {
- }
- }
- if ((flags & MASK_FCOMMENT) != 0)
- {
- char c;
- while ((c = br.ReadChar()) != 0)
- {
- System.Console.Write(c);
- }
- System.Console.WriteLine();
- }
- System.Console.WriteLine(buff[3]);
- System.Console.ReadLine();
- return;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement