1 /* 2 * Data stream functions 3 * 4 * Copyright (C) 2018-2021, Joachim Metz <joachim.metz@gmail.com> 5 * 6 * Refer to AUTHORS for acknowledgements. 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #if !defined( _LIBFSAPFS_DATA_STREAM_H ) 23 #define _LIBFSAPFS_DATA_STREAM_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "libfsapfs_encryption_context.h" 29 #include "libfsapfs_io_handle.h" 30 #include "libfsapfs_libcdata.h" 31 #include "libfsapfs_libcerror.h" 32 #include "libfsapfs_libfdata.h" 33 34 #if defined( __cplusplus ) 35 extern "C" { 36 #endif 37 38 int libfsapfs_data_stream_initialize_from_data( 39 libfdata_stream_t **data_stream, 40 const uint8_t *data, 41 size_t data_size, 42 libcerror_error_t **error ); 43 44 int libfsapfs_data_stream_initialize_from_file_extents( 45 libfdata_stream_t **data_stream, 46 libfsapfs_io_handle_t *io_handle, 47 libfsapfs_encryption_context_t *encryption_context, 48 libcdata_array_t *file_extents, 49 size64_t data_stream_size, 50 uint8_t is_sparse, 51 libcerror_error_t **error ); 52 53 int libfsapfs_data_stream_initialize_from_compressed_data_stream( 54 libfdata_stream_t **data_stream, 55 libfdata_stream_t *compressed_data_stream, 56 size64_t uncompressed_data_size, 57 int compression_method, 58 libcerror_error_t **error ); 59 60 #if defined( __cplusplus ) 61 } 62 #endif 63 64 #endif /* !defined( _LIBFSAPFS_DATA_STREAM_H ) */ 65 66