Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: some general questions about sounds Pin
blakeb_18-Dec-03 9:57
blakeb_18-Dec-03 9:57 
GeneralRe: some general questions about sounds Pin
Heath Stewart8-Dec-03 10:02
protectorHeath Stewart8-Dec-03 10:02 
GeneralRe: some general questions about sounds Pin
leppie8-Dec-03 10:33
leppie8-Dec-03 10:33 
GeneralRe: some general questions about sounds Pin
leppie8-Dec-03 10:38
leppie8-Dec-03 10:38 
GeneralRe: some general questions about sounds Pin
blakeb_18-Dec-03 10:55
blakeb_18-Dec-03 10:55 
GeneralRe: some general questions about sounds Pin
Heath Stewart8-Dec-03 11:43
protectorHeath Stewart8-Dec-03 11:43 
GeneralRe: some general questions about sounds Pin
blakeb_18-Dec-03 11:49
blakeb_18-Dec-03 11:49 
GeneralRe: some general questions about sounds Pin
Heath Stewart8-Dec-03 11:56
protectorHeath Stewart8-Dec-03 11:56 
As leppie was saying, it's just a file with offsets - your typical archive type file. You could have a structure as the first blob in the file like so:
public struct Header
{
  public int count;
  public FileHeader[] headers;
}
public struct FileHeader
{
  public string Filename;
  public long Offset;
  public long Length;
}
You fill the Header structure with information, such as how many files are in the archive and an array that represents each file. You can provide a filename (might as well) and a byte offset to where that file is found. You can get a lot more advanced than this, and even this basic example wouldn't work as well as many others out there.

Basically, though, you take that offset (either from the beginning of the file (offset 0) or from the end of the Header (offset == size of Header, including the array of FileHeaders), and start reading a byte array from that Offset until Length bytes has been read.

There is no standard way of doing this, but I do remember seeing a couple of articles about archives here on CP. You could try googling for keywords such as archive, header, and other stuff I've used here. leppie might have some other suggestions.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
Generaldetecting internet connection Pin
godzooky8-Dec-03 8:45
godzooky8-Dec-03 8:45 
GeneralRe: detecting internet connection Pin
Heath Stewart8-Dec-03 9:46
protectorHeath Stewart8-Dec-03 9:46 
GeneralDataRepeater Control Pin
RB@Emphasys8-Dec-03 8:08
RB@Emphasys8-Dec-03 8:08 
GeneralRe: DataRepeater Control Pin
Heath Stewart8-Dec-03 9:34
protectorHeath Stewart8-Dec-03 9:34 
GeneralHelp with simple user control Pin
Charlie Williams8-Dec-03 8:05
Charlie Williams8-Dec-03 8:05 
GeneralRe: Help with simple user control Pin
Heath Stewart8-Dec-03 9:25
protectorHeath Stewart8-Dec-03 9:25 
GeneralRe: Help with simple user control Pin
Charlie Williams8-Dec-03 11:56
Charlie Williams8-Dec-03 11:56 
QuestionDynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Paul Evans8-Dec-03 6:46
Paul Evans8-Dec-03 6:46 
AnswerRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Heath Stewart8-Dec-03 7:01
protectorHeath Stewart8-Dec-03 7:01 
GeneralRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Paul Evans8-Dec-03 7:19
Paul Evans8-Dec-03 7:19 
GeneralRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Heath Stewart8-Dec-03 9:04
protectorHeath Stewart8-Dec-03 9:04 
GeneralThread-Safe Singleton Pin
bzurer8-Dec-03 4:18
bzurer8-Dec-03 4:18 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 5:07
protectorHeath Stewart8-Dec-03 5:07 
GeneralRe: Thread-Safe Singleton Pin
Paul Evans8-Dec-03 6:37
Paul Evans8-Dec-03 6:37 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 6:56
protectorHeath Stewart8-Dec-03 6:56 
GeneralRe: Thread-Safe Singleton Pin
Paul Evans8-Dec-03 7:05
Paul Evans8-Dec-03 7:05 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 7:12
protectorHeath Stewart8-Dec-03 7:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.