Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A wrapper for sparse file detection

Project description

# fs-sparse: a wrapper to check sparse file

## Generate test files

Using scripts provided in test/create_test_file.sh, it will generate two files:

  • normal.dat with no holes;
  • sparse.dat with holes.

## Usage

The interface exposes three functions, see example below. Note that if a file has no holes, the # of extents (or tuple) will be 1.

In [1]: import sparse

In [2]: sparse.get_extents(“test/sparse.dat”) Out[2]: [(0, 8192), (28672, 36864), (40960, 45056)]

In [3]: sparse.get_extents(“test/normal.dat”) Out[3]: [(0, 8192)]

In [4]: sparse.is_sparse(“test/normal.dat”) Out[4]: False

Please open issues for bug fix or feature requests.

Project details


Release history Release notifications

This version
History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
fs_sparse-0.1.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None Mar 2, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page