MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / RawPutBE4

Function RawPutBE4

Libraries/unrar/rawint.hpp:96–108  ·  view source on GitHub ↗

Save integer to memory as big endian.

Source from the content-addressed store, hash-verified

94
95// Save integer to memory as big endian.
96inline void RawPutBE4(uint32 i,byte *mem)
97{
98#if defined(USE_MEM_BYTESWAP) && defined(_MSC_VER)
99 *(uint32*)mem = _byteswap_ulong(i);
100#elif defined(USE_MEM_BYTESWAP) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 2)
101 *(uint32*)mem = __builtin_bswap32(i);
102#else
103 mem[0]=byte(i>>24);
104 mem[1]=byte(i>>16);
105 mem[2]=byte(i>>8);
106 mem[3]=byte(i);
107#endif
108}
109
110
111inline uint32 ByteSwap32(uint32 i)

Callers 2

sha256_doneFunction · 0.85
sha1_doneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected