static void unpack(unsigned short *tgt, const unsigned char *src, unsigned int len)
{
  int x,y,z;
  int n,temp;
  int buffer[len];
  for (x=0;x<len;tgt[x++]=0)
    buffer[x]=9+(x&1);
  for (x=y=z=0;x<len ;x++) {
    n=buffer[y]-z;
    temp=src[x];
    if (n<8) temp&=255>>(8-n);
    tgt[y]+=temp<<z;
    if (n<=8) {
      tgt[++y]+=src[x]>>n;
      z=8-n;
    } else z+=8;
  }
}
['static void unpack(unsigned short *tgt, const unsigned char *src, unsigned int len)\n{\n  int x,y,z;\n  int n,temp;\n  int buffer[len];\n  for (x=0;x<len;tgt[x++]=0)\n    buffer[x]=9+(x&1);\n  for (x=y=z=0;x<len ;x++) {\n    n=buffer[y]-z;\n    temp=src[x];\n    if (n<8) temp&=255>>(8-n);\n    tgt[y]+=temp<<z;\n    if (n<=8) {\n      tgt[++y]+=src[x]>>n;\n      z=8-n;\n    } else z+=8;\n  }\n}']