void streamLastValidID(stream *s, streamID *maxid)
{
    streamIterator si;
    streamIteratorStart(&si,s,NULL,NULL,1);
    int64_t numfields;
    streamIteratorGetID(&si,maxid,&numfields);
    streamIteratorStop(&si);
}
void streamLastValidID(stream *s, streamID *maxid)
{
    streamIterator si;
    streamIteratorStart(&si,s,NULL,NULL,1);
    int64_t numfields;
    streamIteratorGetID(&si,maxid,&numfields);
    streamIteratorStop(&si);
}