[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Raw sample storage format

From: David Carr
Subject: [Discuss-gnuradio] Raw sample storage format
Date: Wed, 09 Mar 2005 13:03:45 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041227 MultiZilla/

As it stands right now, a raw sample file is just that, raw values in a file. It seems that it might be wise to include some sort of header in the file that describes its contents just a little. An idea for a few fields is below. To ease implmentation the header could be a fixed length and if the program was uninterested in the header info it could just seek to the beginning of the data.

example header: [data could be stored in text or binary format - binary shown] uint16 [magic key to descriminate headerless files from files with headers - for backwards compatibility]
char[255]                    name/description
sizeof(struct timeval)   date
char[255]                    comments
uint32                         sample_rate
uint8                           bits_per_sample
double                         if_freq

I think that the implementation would be rather trivial to do (if I could do it, it must be). Whether to store the data in text or binary format is an interesting question. If the data is in text format its human readable but the binary format is more compact and easier for the code to deal with.

Lets hear some thoughts,
-David Carr

reply via email to

[Prev in Thread] Current Thread [Next in Thread]