Advertisement
akass

Untitled

Aug 11th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1.      string filename = args[0];//разбиваемый файл
  2.      int partsize = Convert.ToInt32(args[1]);//размер части файла в байтах
  3.      byte[] file =  //массив байт разбиваемого файла
  4.            
  5.             int position = 0;
  6.    for (int i = 0; i < file.Length; i += partsize)
  7.             {
  8.                 byte[] block = new byte[partsize];
  9.  
  10.                 for (int j = 0; j < block.Length; j++)
  11.                 {
  12.  
  13.                     block[j] = file[position++];
  14.                
  15.                    
  16.                 }
  17.  
  18.                 bloksdict.Add(new BLOCK(block));
  19.              
  20.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement