| 1 |
/********************************************************************* |
| 2 |
Blosc - Blocked Shuffling and Compression Library |
| 3 |
|
| 4 |
Copyright (c) 2021 Blosc Development Team <[email protected]> |
| 5 |
https://blosc.org |
| 6 |
License: BSD 3-Clause (see LICENSE.txt) |
| 7 |
|
| 8 |
See LICENSE.txt for details about copyright and rights to use. |
| 9 |
**********************************************************************/ |
| 10 |
|
| 11 |
|
| 12 |
#ifndef BLOSC_SCHUNK_PRIVATE_H |
| 13 |
#define BLOSC_SCHUNK_PRIVATE_H |
| 14 |
|
| 15 |
#include "b2nd.h" |
| 16 |
|
| 17 |
#include <stdbool.h> |
| 18 |
#include <stdlib.h> |
| 19 |
#include <stdint.h> |
| 20 |
|
| 21 |
/********************************************************************* |
| 22 |
|
| 23 |
Functions meant to be used internally. |
| 24 |
|
| 25 |
*********************************************************************/ |
| 26 |
|
| 27 |
/** |
| 28 |
* @brief Get the chunk indexes needed to get the slice. |
| 29 |
* |
| 30 |
* @param schunk The super-chunk. |
| 31 |
* @param start Index (0-based) where the slice begins. |
| 32 |
* @param stop The first index (0-based) that is not in the selected slice. |
| 33 |
* @param chunks_idx The pointer to the buffer where the indexes will be written. |
| 34 |
* |
| 35 |
* |
| 36 |
* @return The number of chunks needed to get the slice. If some problem is |
| 37 |
* detected, a negative code is returned instead. |
| 38 |
*/ |
| 39 |
int schunk_get_slice_nchunks(blosc2_schunk *schunk, int64_t start, int64_t stop, int64_t **chunks_idx); |
| 40 |
#endif /* BLOSC_SCHUNK_PRIVATE_H */ |