|
by: Derfel |
last post by:
Hello all,
I have a file of binary data. I want to read this file and parse the data in
it. The format of the file is:
8 bits number of data pakets
6 bits offset
20 bits time
8 states
How can I read this fields in binary? I see the struct module and the
binascii, but I can't split the diferent fiels.
|
by: Matthias Czapla |
last post by:
Hi!
Whats the canonical way for handling raw data. I want to read a file without
making any assumption about its structure and store portions of it in memory
and compare ranges with constant byte sequences. _I_ would read it
into arrays of unsigned char and use C's memcmp(), but as you see Im a
novice C++ programmer and think that theres some better, typically used,
way.
Regards
|
by: Steven T. Hatton |
last post by:
27.4.2.1.4 Type ios_base::openmode
Says this about the std::ios::binary openmode flag:
*binary*: perform input and output in binary mode (as opposed to text mode)
And that is basically _all_ it says about it. What the heck does the binary
flag mean?
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in...
|
by: wwj |
last post by:
void main()
{
char* p="Hello";
printf("%s",p);
*p='w';
printf("%s",p);
}
|
by: Neo |
last post by:
Hello:
I am receiving a Binary File in a Request from a application. The
stream which comes to me has the boundary (Something like
"---------------------------39<WBR>0C0F3E0099" without the quotes),
and also
some more text like this and file name (e.g. "Content-Disposition:
form-data; name="upload_file"; filename="C:\testing\myfile.da<WBR>t"
Content-Type: application/octet-stream")
|
|
by: Patient Guy |
last post by:
Has anyone written code that successfully manipulates binary file data
using Javascript?
It might---and in the case of doing I/O, will---make use of browser-
specific functions (ActiveX/COM with Internet Explorer, XPCOM/XPConnect
with Mozilla/Firefox).
I am writing client-side code that will generate binary data for producing
a GIF file through an OBJECT element. (The GIF is an image of a line and
points on a two-axis plot.)
|
by: Gladiator |
last post by:
When I am trying to execute a program from "The C Programming Language"
by Dennis Ritchie, I tried to run the following program.I am using
Dev++ as a compiler software. The
Program is presented below.
#include <stdio.h>
main()
{
long nc;
|
by: Registered User |
last post by:
I've read in a book:
<quote>
With a binary-mode stream, you can't detect the end-of-file by looking
for EOF, because a byte of data from a binary stream could have that
value, which would result in premature end of input. Instead, you can
use the library function feof(), which can be used for both binary- and
text-mode files:
int feof(FILE *fp);
|
by: kboyd |
last post by:
Dear all, I'm new to the forum, I'm really sorry if this has appeared elsewhere. I'm not really a programmer and am having major difficulties handling a binary stream which I am trying to read and process in vb.net.
The stream is coming in from an FTDI chip and should contain 64 8-bit values.
An example of the stream is here
ٶ
I need to get this into something that I can...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|