third_party/inchi/INCHI_BASE/src/ikey_base26.c
const char* base26_triplet_2( const unsigned char *a )
{
    UINT32 b0, b1, b2, h;
#ifndef FIX_BASE26_ENC_BUG
    b0 = (UINT32) ( a[1] & 0xc0 );   /* 1100 0000  */
    b1 = (UINT32) ( a[2] );         /* 1111 1111  */
    b2 = (UINT32) ( a[3] & 0x0f );  /* 0000 1111  */
    h = (UINT32) ( b0 | b1 << 8 | b2 << 16 ) >> 6;
#else
    b0 = (UINT32) ( a[1] & 0x03 );   /* 0000 0011 */
    b1 = (UINT32) ( a[2] );         /* 1111 1111 */
    b2 = (UINT32) ( a[3] & 0xf0 );  /* 1111 0000 */
    h = (UINT32) ( b0 << 16 | b1 << 8 | b2 ) >> 4;
#endif
    return t26[h];
}
/****************************************************************************
 Get a character representing 2nd 14-bit triplet (bits 14..27)
****************************************************************************/
Get a character representing 2nd 14-bit triplet (bits 14..27)
Get a character representing 2nd 14 - bit triplet ( bits 14 .. 27 )
const char* base26_triplet_2( const unsigned char *a )
{
    UINT32 b0, b1, b2, h;
#ifndef FIX_BASE26_ENC_BUG
    b0 = (UINT32) ( a[1] & 0xc0 );   
    b1 = (UINT32) ( a[2] );         
    b2 = (UINT32) ( a[3] & 0x0f );  
    h = (UINT32) ( b0 | b1 << 8 | b2 << 16 ) >> 6;
#else
    b0 = (UINT32) ( a[1] & 0x03 );   
    b1 = (UINT32) ( a[2] );         
    b2 = (UINT32) ( a[3] & 0xf0 );  
    h = (UINT32) ( b0 << 16 | b1 << 8 | b2 ) >> 4;
#endif
    return t26[h];
}
const char * base26_triplet_2 ( const unsigned char * a ) { UINT32 b0 , b1 , b2 , h ; #ifndef FIX_BASE26_ENC_BUG b0 = ( UINT32 ) ( a [ 1 ] & 0xc0 ) ; b1 = ( UINT32 ) ( a [ 2 ] ) ; b2 = ( UINT32 ) ( a [ 3 ] & 0x0f ) ; h = ( UINT32 ) ( b0 | b1 << 8 | b2 << 16 ) >> 6 ; #else b0 = ( UINT32 ) ( a [ 1 ] & 0x03 ) ; b1 = ( UINT32 ) ( a [ 2 ] ) ; b2 = ( UINT32 ) ( a [ 3 ] & 0xf0 ) ; h = ( UINT32 ) ( b0 << 16 | b1 << 8 | b2 ) >> 4 ; #endif return t26 [ h ] ; }
Get a character representing 2nd 14-bit triplet (bits 14..27)
Get a character representing 2nd 14 - bit triplet ( bits 14 .. 27 )
/* 1100 0000  */ /* 1111 1111  */ /* 0000 1111  */ /* 0000 0011 */ /* 1111 1111 */ /* 1111 0000 */