Base64DecodePipe

Base64DecodePipe(istream)

Returns a new read-only I/O stream, which decodes base64-encoded data read from istream.

Examples

Base64DecodePipe(istream)

Returns a new read-only I/O stream, which decodes base64-encoded data read from istream.

Examples:

  1. Decode base64-encoded data from a file:

    julia> file = open("encoded.txt", "r");
    julia> decoded_stream = Base64DecodePipe(file);
  2. Decode base64-encoded data from a network stream:

    julia> using Sockets
    julia> sock = connect("example.com", 80)
    julia> request = "GET /data HTTP/1.1\r\nHost: example.com\r\n\r\n"
    julia> write(sock, request)
    julia> response = read(sock, String)
    julia> decoded_stream = Base64DecodePipe(IOBuffer(response))
  3. Read decoded data from the stream:
    julia> while !eof(decoded_stream)
              data = read(decoded_stream, UInt8, 100)
              # Process the decoded data
          end

Note: The examples provided assume that the input stream (istream) contains valid base64-encoded data.

See Also

ascii, base64decode, Base64DecodePipe, base64encode, Base64EncodePipe, bin, bits, bytestring, charwidth, chomp, chop, chr2ind, contains, endswith, escape_string, graphemes, ind2chr, iscntrl, istext, isupper, isvalid, join, lcfirst, lowercase, lpad, lstrip, normalize_string, num2hex, parseip, randstring, readuntil, replace, repr, rpad, rsplit, rstrip, search, searchindex, split, startswith, string, stringmime, strip, strwidth, summary, takebuf_string, ucfirst, unescape_string, uppercase, utf16, utf32, utf8, wstring,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: