TIFFSTRILEQUERY(3tiff) LibTIFF TIFFSTRILEQUERY(3tiff) NNAAMMEE TIFFStrileQuery - get strile byte count and offset SSYYNNOOPPSSIISS #include uuiinntt6644__tt TTIIFFFFGGeettSSttrriilleeBByytteeCCoouunntt((TTIIFFFF **ttiiff,, uuiinntt3322__tt ssttrriillee));; uuiinntt6644__tt TTIIFFFFGGeettSSttrriilleeOOffffsseett((TTIIFFFF **ttiiff,, uuiinntt3322__tt ssttrriillee));; uuiinntt6644__tt TTIIFFFFGGeettSSttrriilleeBByytteeCCoouunnttWWiitthhEErrrr((TTIIFFFF **ttiiff,, uuiinntt3322__tt ssttrriillee,, iinntt **ppbbEErrrr));; uuiinntt6644__tt TTIIFFFFGGeettSSttrriilleeOOffffsseettWWiitthhEErrrr((TTIIFFFF **ttiiff,, uuiinntt3322__tt ssttrriillee,, iinntt **ppbbEErrrr));; DDEESSCCRRIIPPTTIIOONN Make defer strile offset/bytecount loading available at runtime and add per-strile offset/bytecount loading capabilities. Part of this commit makes the behaviour that was previously met when lliibbttiiffff was compiled with --DDDDEEFFEERR__SSTTRRIILLEE__LLOOAADD available for default builds. When specifying the new DD (Deferred) _T_I_F_F_O_p_e_n_(_) flag, the loading of strile offset/bytecount is defered. In that mode, the SSttrriippOOffffsseettss / SSttrriippBByytteeCCoouunnttss or TTiilleeOOffffsseettss / TTiilleeBByytteeCCoouunnttss arrays are only loaded when first accessed. This can speed-up the opening of files stored on the network when just metadata retrieval is needed. Another addition is the capability of loading only the values of the offset/bytecount of the strile of interest instead of the whole array. This is enabled with the new OO (Ondemand) flag of _T_I_F_F_O_p_e_n_(_) (which implies DD). The public _T_I_F_F_G_e_t_S_t_r_i_l_e_O_f_f_s_e_t_(_), _T_I_F_F_G_e_t_S_t_r_i_l_e_O_f_f_s_e_t_W_i_t_h_E_r_r_(_), _T_I_F_F_G_e_t_S_t_r_i_l_e_B_y_t_e_C_o_u_n_t_(_) and _T_I_F_F_G_e_t_S_t_r_i_l_e_B_y_t_e_C_o_u_n_t_W_i_t_h_E_r_r_(_) functions have been added to API. They are of particular interest when using sparse files (with ooffffsseett ==== bbyytteeccoouunntt ==== 00) and you want to detect if a strile is present or not without decompressing the data, or updating an existing sparse file. _T_I_F_F_G_e_t_S_t_r_i_l_e_B_y_t_e_C_o_u_n_t_(_) returns the value of the TileByteCounts / StripByteCounts array for the specified tile/strile. _T_I_F_F_G_e_t_S_t_r_i_l_e_B_y_t_e_C_o_u_n_t_W_i_t_h_E_r_r_(_) additionally provides _p_b_E_r_r as an _i_n_t pointer to an error return variable, which is set to 0 for successful return or to 1 for an error return. _T_I_F_F_G_e_t_S_t_r_i_l_e_O_f_f_s_e_t_(_) returns the value of the TileOffsets / StripOff- sets array for the specified tile/strile. _T_I_F_F_G_e_t_S_t_r_i_l_e_O_f_f_s_e_t_W_i_t_h_E_r_r_(_) additionally provides _p_b_E_r_r as an _i_n_t pointer to an error return variable, which is set to 0 for successful return or to 1 for an error return. DDIIAAGGNNOOSSTTIICCSS All error messages are directed to the _T_I_F_F_E_r_r_o_r_E_x_t_R_(_) routine. Like- wise, warning messages are directed to the _T_I_F_F_W_a_r_n_i_n_g_E_x_t_R_(_) routine. SSEEEE AALLSSOO _l_i_b_t_i_f_f (3tiff), _T_I_F_F_O_p_e_n (3tiff), _T_I_F_F_D_e_f_e_r_S_t_r_i_l_e_A_r_r_a_y_W_r_i_t_i_n_g (3tiff) AAUUTTHHOORR LibTIFF contributors CCOOPPYYRRIIGGHHTT 1988-2022, LibTIFF contributors 4.6 Sep 08, 2023 TIFFSTRILEQUERY(3tiff)