Results 1 to 3 of 3

Thread: [RESOLVED] Des File.ReadAllBytes preserve a files structure

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Resolved [RESOLVED] Des File.ReadAllBytes preserve a files structure

    Hi,

    Im currently working with MP4 files. The methods im working on open the file and begin to traverse the "atom" tree contained within which is essentially a structure that I need data from. This means I need to keep the file in use while I traverse the tree, would it be better to use File.ReadAllBytes and traverse and Array instead?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Des File.ReadAllBytes preserve a files structure

    If locking the file while you traverse it is an issue then you might be better to use an in-memory array, as you suggest. It might also be faster, depending on exactly what you're doing. You might also consider copying the data to a MemoryStream if working with a stream is easier.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Des File.ReadAllBytes preserve a files structure

    Cheers Jmc,

    Thread Resolved!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width