File bincvt.icn

Summary

###########################################################################

	File:     bincvt.icn

	Subject:  Procedures to convert binary data

	Author:   Robert J. Alexander

	Date:     October 16, 1996

###########################################################################

   This file is in the public domain.

###########################################################################

  unsigned() -- Converts binary byte string into unsigned integer.
  Detects overflow if number is too large.

  This procedure is normally used for processing of binary data
  read from a file.

  raw() -- Puts raw bits of characters of string s into an integer.  If
  the size of s is less than the size of an integer, the bytes are put
  into the low order part of the integer, with the remaining high order
  bytes filled with zero.  If the string is too large, the most
  significant bytes will be lost -- no overflow detection.

  This procedure is normally used for processing of binary data
  read from a file.

  rawstring() -- Creates a string consisting of the raw bits in the low
  order "size" bytes of integer i.

  This procedure is normally used for processing of binary data
  to be written to a file.

###########################################################################
Procedures:
raw, rawstring, unsigned

This file is part of the (main) package.

Source code.

Details
Procedures:

raw(s)


rawstring(i, size)


unsigned(s)



This page produced by UniDoc on 2021/04/15 @ 23:59:54.