Octet Stream Base64

Warning: Our tools are server side tools, unless we stated otherwise. We do not keep or inspect the contents of the entered data in any way, and all communications with our servers are made through HTTPS (secured SSL). Regardless, we are strongly advise to avoid using sensitive data for our tools.

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding.

  1. Octet bitstream; 0 1 2 3 4 5 6 7 8 9 A B C D E F; 00: 0: 1: 10: 11: 100: 101: 110: 111: 1000: 1001: 1010: 1011: 1101: 1101: 1110: 1111: 10: 10000: 10001: 10010: 10011.
  2. PDF Blob is returned as octet-stream which I can't convert to Base64. Closed BirudVora opened this issue Jul 17, 2019 4 comments Closed.

Octet-stream Base64

Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data. This is to ensure that the data remain intact without modification during transport. Base64 is commonly used in a number of applications including email via MIME, and storing complex data in XML.

Check here for Base64 Decode Explanation

Octet

or check our knowledgebase about Base64 encoding

Base64 encode your data without hassles or decode it into a human-readable format. Base64 encoding schemes are commonly used when there is a need to encode binary data, especially when that data needs to be stored and transferred over media that are designed to deal with text.

The DICOM Value Representation (VR) is included in each DICOM JSON Model attribute object and named 'vr'. For example:

The JSON encoding of an Attribute shall use the JSON Data Type corresponding to the DICOM Value Representations in Table F.2.3-1. The JSON encodings shall conform to the Definition, Character Repertoire (if applicable) and Length of Value specified for that DICOM Value Representation (see Section 6.2 “Value Representation (VR)” in PS3.5) with the following exceptions:

Application/octet-stream
  • Attributes with a Value Representation of AT shall be restricted to eight character uppercase hexadecimal representation of a DICOM Tag

Application/octet-stream Base64

Table F.2.3-1. DICOM VR to JSON Data Type Mapping

Octet Stream To Base64 Java

VR Name

Type

JSON Data Type

AE

Application Entity

String

AS

Age String

String

AT

Attribute Tag

String

CS

Code String

String

DA

Date

String

DS

Decimal String

Number or String

See note.

DT

Date Time

String

FL

Floating Point Single

Number

FD

Floating Point Double

Number

IS

Integer String

Number or String

See note.

LO

Long String

String

LT

Long Text

String

OB

Other Byte

Base64 encoded octet-stream

OD

Other Double

Base64 encoded octet-stream

OF

Other Float

Base64 encoded octet-stream

OL

Other Long

Base64 encoded octet-stream

OV

Other 64-bit Very Long

Base64 encoded octet-stream

OW

Other Word

Base64 encoded octet-stream

PN

Person Name

Object containing Person Name component groups as strings (see Section F.2.2)

SH

Short String

String

SL

Signed Long

Number

SQ

Sequence of Items

Array containing DICOM JSON Objects

SS

Signed Short

Number

ST

Short Text

String

SV

Signed 64-bit Very Long

Number or String

See Note.

TM

Time

String

UC

Unlimited Characters

String

UI

Unique Identifier (UID)

String

UL

Unsigned Long

Number

UN

Unknown

Base64 encoded octet-stream

UR

Universal Resource Identifier or Universal Resource Locator (URI/URL)

String

US

Unsigned Short

Number

UT

Unlimited Text

String

UV

Unsigned 64-bit Very Long

Number or String.

See Note.

Octet Stream Vs Base64


Octet-stream Base64

Note

For IS, DS, SV and UV, a JSON String representation can be used to preserve the original format during transformation of the representation, or if needed to avoid losing precision of a decimal string.

Although data, such as dates, are represented in the DICOM JSON model as strings, it is expected that they will be treated in the same manner as the original attribute as defined by Chapter 6 in PS3.6.