Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board
Go4Expert
Go4Expert RSS Feed

Go Back   Programming and SEO Forum >  Go4Expert > Articles / Source Code > Engineering concepts

Discuss / Comment  Copy HTML to Clipboard  Copy BBCode to Clipboard  | More
 
Bookmarks Article Tools Search this Article Display Modes

What is a binary-safe function?


On 16th July, 2007
Talking What is a binary-safe function?

Show Printable Version Email this Page Subscription Add to Favorites Copy What is a binary-safe function? link

Author

pradeep ( Team Leader )

Yet to provide details about himself


All articles By pradeep

Recent Articles

Similar Articles

A binary-safe function is a function or operation that can be performed on a binary file without modifying the contents of the file. This ensures that the file is not corrupted or mutilated by the function or operation.

Binary data is encoded as a string of ones and zeros (bits), but is not formatted in any particular way. The bits are simply there, and no meaning is attached to them. Most programs, in contrast, have formatting codes that assign certain meanings to specific strings of bits. When a program is used in an attempt to read a binary file, the file is interpreted according to the rules of that program. Unless the formating codes of the reading program match the formatting codes of the program in which the file was written, the display makes no sense, or else contains a jumble of apparently meaningless symbols in addition to data that has been stripped of formatting codes.

An image such as a JPEG file can be opened in a word processor, but the image does not appear. Instead, garbage is displayed. Any attempt to edit and then save a JPEG file using a word processor will result in modification of the binary data, such that the result is no longer readable by the intended program. The file is, in effect, corrupted. The editing of a JPEG image file using a word processor is thus an example of a function that is not binary-safe.

Issues with binary safety are often encountered when binary files are transferred over the Internet. This is especially true for large files, which can cause overflow of the memory, buffer, or storage capacity in one or more servers. Sometimes, transferred files are subjected to functions that strip formatting codes, or that incorrectly interpret certain binary strings as formatting codes. For example, angle brackets can be falsely interpreted as markers for HTML tags, or desired tags may be lost in the transfer of an HTML file. Quotation marks in plain-text or ASCII format may not be read that way by a Web browser. An HTML editor will convert quotation marks (") into a string of characters to prevent this confusion. An extra space ( ) in a Web page appears as a string of characters when the HTML source code is viewed in a text editor such as Windows Notepad. Conversely, such character strings are interpreted by Web browsers as quotation marks and spaces, even if the author of the file did not intend for them to be interpreted that way.

Binary files can be protected from undesired modification by programs. In the worst-case scenario, such modification can result in permanent loss of data because of file corruption. Sensitive files should always be backed up on read-only media such as a recordable compact disc (CD-R), so the original data can be retrieved in case of unwanted modification by a function that is not binary-safe. When transferring binary files to a Web site using a File Transfer Protocol (FTP) program, the "binary" setting can be used to prevent unwanted modification of the file contents during the transfer process.
Old 07-19-2007, 05:14 PM   #2
Go4Expert Member
 
Join Date: Jun 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
adithespeedy is on a distinguished road

i dont know


i want full info send it to my email id
adithespeedy is offline   Reply With Quote
Discuss / Comment  Copy HTML to Clipboard  Copy BBCode to Clipboard  | More


Currently Active Users Reading This Article: 1 (0 members and 1 guests)
 
Article Tools Search this Article
Search this Article:

Advanced Search
Display Modes
Bookmarks

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads / Articles
Thread Thread Starter Forum Replies Last Post
Yahoo packets in VB ! kush_2207 Visual Basic [VB] 11 05-10-2010 02:23 PM
Functions in Visual Basic Sanskruti Visual Basic [VB] 1 05-01-2008 03:03 AM
Functions in VBScript Sanskruti HTML/DHTML - JavaScript/VBScript 0 05-07-2007 05:30 PM
Worker Threads in MFC Sanskruti MFC / Win32 0 02-28-2007 06:26 PM
Binary to binary coded decimal conversion problem LaVic C-C++ 3 07-21-2006 09:17 PM

 

All times are GMT +5.5. The time now is 04:10 AM.