473,406 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Simple Q re Deserialisation

I need to read a binary file (whose structure I know - at least in
generic terms) and just learning about how best to do it.

Looking at deserialisation this seems to be one direct approach. But
from what I've read thus far I'm unclear about whether a binary file
needs to have been created with serialise before it can be read with
deserialise (ie is there some information added to the file) or can
deserialise be used with any binary file provided you know its
structure and read it in to a set of appropriate variables?

JGD
Nov 20 '05 #1
1 1053
Hi John,

In general, you want to create your file using serialization and then read it using deserialization. This insures that the way the data is serialized matches
what yu expect as you read it. There's nothing unique added to the file to indicate the data was serialized, it has more to do with the structure of the data
itself. If you know this structure, then you can create the file anyway you please.

Hope this helps,
Craig VB .Net Team

-------------------------------------------------------------------

This reply is provided AS IS, without warranty (express or implied)
--------------------
From: John Dann <ne**@prodata.co.uk>
Newsgroups: microsoft.public.dotnet.languages.vb
Subject: Simple Q re Deserialisation
Date: Mon, 21 Jun 2004 17:03:29 +0100
Lines: 11
Message-ID: <la********************************@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de gwMfWC1ysSC0p18k55XNKwvsCyXI0iRML9Ni5O4IJ0Nm1QvnkL
X-Newsreader: Forte Agent 1.93/32.576 English (American)
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.com!news.tele.dk!news.t ele.dk! small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mailXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:211305
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I need to read a binary file (whose structure I know - at least in
generic terms) and just learning about how best to do it.

Looking at deserialisation this seems to be one direct approach. But
from what I've read thus far I'm unclear about whether a binary file
needs to have been created with serialise before it can be read with
deserialise (ie is there some information added to the file) or can
deserialise be used with any binary file provided you know its
structure and read it in to a set of appropriate variables?

JGD

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: delisonews | last post by:
I'm looking for a simple, filesystem-based message board. (No MySQL!) Something that I could include easily in my code: include '../inc/messageboard.php'; .... so that the board shows up at...
3
by: Patchwork | last post by:
Hi Everyone, Please take a look at the following (simple and fun) program: //////////////////////////////////////////////////////////////////////////// ///////////// // Monster Munch, example...
8
by: Dan | last post by:
Using XML::Simple in perl is extreemly slow to parse big XML files (can be up to 250M, taking ~1h). How can I increase my performance / reduce my memory usage? Is SAX the way forward?
6
by: Manuel Collado | last post by:
I would like to write simple, yet well structured documents with a really simple XML DTD (or schema). Either Docbook or SDocbook are overkill for this simple case. XHTML is simpler, but...
7
by: drewnoakes | last post by:
I have an application that performs custom deserialisation of object state from byte arrays. This happens very regularly, so needs to be fast. In addition, most of the strings repeat, meaning I'm...
7
by: abcd | last post by:
I am trying to set up client machine and investigatging which .net components are missing to run aspx page. I have a simple aspx page which just has "hello world" printed.... When I request...
7
by: nick.fletcher | last post by:
I have a custom collection which derives from Collection<which stores a number of objects. Before each item is added to the collection - an event which it exposes is hooked by the collection and...
14
by: Giancarlo Berenz | last post by:
Hi: Recently i write this code: class Simple { private: int value; public: int GiveMeARandom(void);
10
by: Phillip Taylor | last post by:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm having some trivial issues. In Visual Studio I create a web services project and change the asmx.vb file to this: Imports...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.