1ff2e18ba5e50dd2d1becd3cd6a25343578c10b8
markd
  Tue Apr 21 14:09:04 2026 -0700
rework of htslib/UDC integration to use htslib hfile driver mechanism

diff --git src/lib/udc.c src/lib/udc.c
index b29eb7b1521..9aa79f10fed 100644
--- src/lib/udc.c
+++ src/lib/udc.c
@@ -2154,30 +2154,36 @@
 void udcSeek(struct udcFile *file, bits64 offset)
 /* Seek to a particular position in file. */
 {
 file->ios.udc.numSeeks++;
 file->offset = offset;
 if (udcCacheEnabled())
     ourMustLseek(&file->ios.sparse,file->fdSparse, offset, SEEK_SET);
 }
 
 bits64 udcTell(struct udcFile *file)
 /* Return current file position. */
 {
 return file->offset;
 }
 
+bits64 udcFileOpenSize(struct udcFile *file)
+/* Return size of open file. */
+{
+return file->size;
+}
+
 static long bitRealDataSize(char *fileName)
 /* Return number of real bytes indicated by bitmaps */
 {
 struct udcBitmap *bits = udcBitmapOpen(fileName);
 int blockSize = bits->blockSize;
 long byteSize = 0;
 int blockCount = (bits->fileSize + blockSize - 1)/blockSize;
 if (blockCount > 0)
     {
     int bitmapSize = bitToByteSize(blockCount);
     Bits *b = needLargeMem(bitmapSize);
     mustReadFd( bits->fd, b, bitmapSize);
     int bitsSet = bitCountRange(b, 0, blockCount);
     byteSize = (long)bitsSet*blockSize;
     freez(&b);