8 #ifndef SRC_XRDEC_XRDECOBJCFG_HH_
9 #define SRC_XRDEC_XRDECOBJCFG_HH_
13 #include <isa-l/crc.h>
26 inline static uint32_t
isal_crc32(uint32_t crc,
void const *buf,
size_t len)
28 const unsigned char* buffer =
reinterpret_cast<const unsigned char*
>( buf );
29 return crc32_gzip_refl( crc, buffer, len );
32 static const std::string
ObjStr =
"obj";
67 std::string url =
plgr[i] +
'/' +
obj;
74 std::string url =
plgr[i] +
'/' +
obj +
".mt";
79 inline std::string
GetFileName(
size_t blknb,
size_t strpnb )
const
81 return ObjStr +
'.' + std::to_string( blknb ) +
'.' + std::to_string( strpnb );
84 const std::string
obj;
92 std::vector<std::string>
plgr;
96 uint32_t (*
digest)(uint32_t,
void const*, size_t);
uint32_t crc32c(uint32_t crc, void const *buf, size_t len)
static const std::string ObjStr
static uint32_t isal_crc32(uint32_t crc, void const *buf, size_t len)
ISAL crc32 implementation.
std::string GetDataUrl(size_t i) const
std::vector< std::string > mdtacgi
std::vector< std::string > plgr
std::string GetMetadataUrl(size_t i) const
const uint64_t paritysize
std::string GetFileName(size_t blknb, size_t strpnb) const
ObjCfg(const std::string &obj, uint8_t nbdata, uint8_t nbparity, uint64_t chunksize, bool usecrc32c, bool nomtfile=false)
uint32_t(* digest)(uint32_t, void const *, size_t)
ObjCfg(const ObjCfg &objcfg)
std::vector< std::string > dtacgi