private void StcoExtend(Atom stco, Atom mdat, ArrayList offsetsInMdat) { byte[] newPayload = new byte[2 * 4 + offsetsInMdat.Count * 8]; /* read 8 bytes - version, flags and entry count */ InFile.ReadBytes(stco.PayloadFileOffset, newPayload, 8); /* apply changes */ stco.Type = "co64"; stco.PayloadData = newPayload; }
private string GetAtomType(InputFile file, ulong position) { string type = ""; byte[] buffer = new byte[4]; file.ReadBytes(position + 4, buffer, 4); for (int pos = 0; pos < 4; pos++) { type += (char)buffer[pos]; } return type; }
private string GetAtomType(InputFile file, ulong position) { string type = ""; byte[] buffer = new byte[4]; file.ReadBytes(position + 4, buffer, 4); for (int pos = 0; pos < 4; pos++) { type += (char)buffer[pos]; } return(type); }
internal void WriteFromInput(InputFile inFile, ulong position, ulong length) { ulong blockSize = 8 * 1024 * 1024; ulong remaining = length; while (remaining > 0) { byte[] buf = new byte[Math.Min(remaining, blockSize)]; inFile.ReadBytes(position, buf, buf.Length); writer.Write(buf); remaining -= (ulong)buf.Length; position += (ulong)buf.Length; } }
internal void WriteFromInput(InputFile inFile, ulong position, ulong length) { ulong blockSize = 8 * 1024 * 1024; ulong remaining = length; while(remaining>0) { byte[] buf = new byte[Math.Min(remaining, blockSize)]; inFile.ReadBytes(position, buf, buf.Length); writer.Write(buf); remaining -= (ulong)buf.Length; position += (ulong)buf.Length; } }