This page discusses concepts related to reading and downloading objects in
Cloud Storage.

## Reading objects

Reading an object refers to streaming, consuming, or inspecting object data or
a specific byte range over an open network connection directly in memory.
Rather than being saved locally, the retrieved payload is ephemeral and lives
in an application memory stream, buffer, pipeline, or directly in CPU/GPU
memory. Reading objects is suitable for high-performance, throughput-intensive
workloads, such as streaming training datasets and tensor batches into
Artificial Intelligence (AI) and Machine Learning (ML) frameworks like Pytorch
or Jax.

The following list describes the types of object reads available in
Cloud Storage:

- [Reading objects into memory or interactive object reads](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt): A method where
  data is consumed interactively or into memory. The client retrieves the entire
  object and loads all of its bytes into a contiguous variable, byte array, or
  in-memory string.

- [Streaming reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt): A method where data is consumed as a stream of
  bytes directly as it's being received from the network, rather than waiting
  for the entire transfer to finish.

## Downloading objects

Downloading an object is an end-to-end task that transfers object data from
Cloud Storage into a persistent file on a local file system, disk, or
target storage device. Unlike in-memory streaming reads, downloading encompasses
both fetching the remote bytes and committing them to local storage. Downloading
objects is primarily suited for general-purpose file management, local
archiving, data backup, and offline utility usage.

When using REST APIs, downloads are performed using HTTP or HTTPS `GET`
requests that can include an optional `Range` header, which defines a specific
portion of the object to download to persistent or local storage. You can also
use the `Range` header to resume interrupted downloads. When using gRPC,
downloads use `storage.v2.Storage/ReadObject` or `BidiReadObject` streams.

The following list describes the types of object downloads available in
Cloud Storage:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt): The most basic form of object downloading. The client
  sends a single request to retrieve either the entire object or a specified
  byte range in one continuous transfer.

- [Sliced object downloads](https://docs.cloud.google.com/storage/docs/sliced-object-downloads.md.txt): A high-performance strategy where a single large
  object is divided into multiple smaller "slices" (also known as "chunks"). The
  client downloads these slices in parallel using multiple independent and
  concurrent requests, then reassembles the slices locally into a single file.

## Tool support for reading and downloading objects

### Console

When using the Google Cloud console, you can perform the following object reads
and downloads:

- [Interactive object reads](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt), typically [authenticated browser downloads](https://docs.cloud.google.com/storage/docs/request-endpoints.md.txt#cookieauth)

### Command line

You can perform the following object reads and downloads when using the
Google Cloud CLI:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Sliced object downloads](https://docs.cloud.google.com/storage/docs/sliced-object-downloads.md.txt)
- [Interactive object reads](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### Client libraries

### C++

You can perform the following types of reads and downloads when using the
C++ client library:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### C#

You can perform the following types of reads and downloads when using the
C# client library:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### Go

You can perform the following types of reads and downloads when using the
Go client library:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### Java

You can perform the following types of reads and downloads when using the
Java client library:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Sliced object downloads](https://docs.cloud.google.com/storage/docs/sliced-object-downloads.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### Node.js

You can perform the following types of reads and downloads when using the
Node.js client library:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Sliced object downloads](https://docs.cloud.google.com/storage/docs/sliced-object-downloads.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### PHP

You can perform the following types of reads and downloads when using the
PHP client library:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### Python

You can perform the following types of reads and downloads when using the
Python client library:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Sliced object downloads](https://docs.cloud.google.com/storage/docs/sliced-object-downloads.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### Ruby

You can perform the following types of reads and downloads when using the
Ruby client library:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)

### REST APIs

If you use REST APIs to download objects, see [Request endpoints](https://docs.cloud.google.com/storage/docs/request-endpoints.md.txt) for
a complete discussion on the request endpoints you can use.

### JSON API

You can perform the following types of downloads when using
the JSON API:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Sliced object downloads](https://docs.cloud.google.com/storage/docs/sliced-object-downloads.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

### XML API

You can perform the following types of downloads when using
the XML API:

- [Simple downloads](https://docs.cloud.google.com/storage/docs/downloading-objects.md.txt)
- [Sliced object downloads](https://docs.cloud.google.com/storage/docs/sliced-object-downloads.md.txt)
- [Reading objects into memory](https://docs.cloud.google.com/storage/docs/reading-objects.md.txt)
- [Streamed object reads](https://docs.cloud.google.com/storage/docs/streaming-reads.md.txt)

## What's next

- [Make your data publicly accessible](https://docs.cloud.google.com/storage/docs/access-control/making-data-public.md.txt).
- [Learn how checksums are used for object downloads](https://docs.cloud.google.com/storage/docs/data-validation.md.txt).
- Learn about [object uploads](https://docs.cloud.google.com/storage/docs/uploads.md.txt).
- [View and edit your object metadata](https://docs.cloud.google.com/storage/docs/viewing-editing-metadata.md.txt).
- Learn how to [transfer data to Cloud Storage using Storage Transfer Service](https://docs.cloud.google.com/storage-transfer/docs/create-transfers.md.txt).
- [Transfer objects from your Compute Engine instance](https://docs.cloud.google.com/compute/docs/instances/transfer-files.md.txt#gcstransfer).