getCalgaryRecords :: CalgaryRecordInfo -> Get (V.Vector Record)
getCalgaryRecords (CalgaryRecordInfo recordInfo) = do
  mystery1 <- getWord32le -- 0

  mystery2 <- getWord32le -- 1: Number of records? Matches first word in block index
  mystery3 <- getWord16le -- 0

  -- let (RecordInfo fs) = recordInfo
  -- f1 <- getValue $ fs !! 0
  -- error $ show f1
  -- bs <- getRemainingLazyByteString
  -- error $ show bs

  V.replicateM (fromIntegral mystery2) $ (getRecord recordInfo)

  -- headend_no <- getValue $ Field "headend_no" FTInt32 Nothing Nothing
  -- hh_no <- getValue $ Field "hh_no" FTInt32 Nothing Nothing
  -- hashed_id <- getValue $ Field "hashed_id" FTVString Nothing Nothing
  -- error $ show hashed_id
  -- bs <- getRemainingLazyByteString
  -- r <- getRecord recordInfo

  -- V.replicateM (fromIntegral mystery2) $ (getRecord recordInfo)
-- --  error $ show [ show mystery1, show mystery2, show mystery3 ]

--   x <- getRecord recordInfo
--   y <- getRecord recordInfo
--   error $ show y

--   byte <- getValue $ Field "byte" FTByte Nothing Nothing

--   int16 <- getValue $ Field "int16" FTInt16 Nothing Nothing

--   int32 <- getValue $ Field "int32" FTInt32 Nothing Nothing

--   int64 <- getValue $ Field "int64" FTInt64 Nothing Nothing

--   decimal <- getValue $ Field "decimal" FTFixedDecimal (Just 7) Nothing

--   mystery6 <- getWord32le -- 0

--   float <- getValue $ Field "float" FTFloat Nothing Nothing

--   double <- getValue $ Field "double" FTDouble Nothing Nothing

--   string <- getValue $ Field "string" FTString (Just 7) Nothing

--   wstring <- getValue $ Field "wstring "FTWString (Just 2) Nothing

--   let vfield = Field "vstring" FTVString Nothing Nothing
--       vwfield = Field "vwstring" FTVWString Nothing Nothing

--   vstring <- getValue vfield
--   vwstring <- getValue vwfield

--   date <- getValue $ Field "date" FTDate Nothing Nothing
--   time <- getValue $ Field "time" FTTime Nothing Nothing
--   datetime <- getValue $ Field "datetime" FTDateTime Nothing Nothing

--   mystery7 <- getWord32le -- 13

-- --  error $ show [
-- --             show mystery1, show mystery2, show mystery3, show mystery4, show mystery5,
-- --                  show mystery6, show mystery7
-- --            ]

--   error $ show [
--              show byte,
--              show int16,
--              show int32,
--              show int64,
--              show decimal,
--              show float,
--              show double,
--              show string,
--              show wstring,
--              show vstring,
--              show vwstring,
--              show date,
--              show time,
--              show datetime
--             ]




--   vfieldVarBs <- getVariableData
--   vwfieldVarBs <- getVariableData

--   remainder <- getRemainingLazyByteString
--   error $ show remainder
--   error $ show [
-- --             show mystery1,
--              show byte,
-- --             show byteNul,
-- --             show mystery2,
-- --             show short,
-- --             show shortNul,

-- --             show mystery3,
-- --             show int,
-- --             show intNul,
--              show int64,
-- --             show int64Nul
--              show remainder
--             ]
--  -- error $ show [ mystery1, byte, byteNul, mystery2, short, shortNul, remainder ]
getCalgaryRecords :: CalgaryRecordInfo -> Get (V.Vector Record)
getCalgaryRecords (CalgaryRecordInfo recordInfo) = do
  mystery1 <- getWord32le -- 0

  mystery2 <- getWord32le -- 1: Number of records? Matches first word in block index
  mystery3 <- getWord16le -- 0

  -- let (RecordInfo fs) = recordInfo
  -- f1 <- getValue $ fs !! 0
  -- error $ show f1
  -- bs <- getRemainingLazyByteString
  -- error $ show bs

  V.replicateM (fromIntegral mystery2) $ (getRecord recordInfo)

  -- headend_no <- getValue $ Field "headend_no" FTInt32 Nothing Nothing
  -- hh_no <- getValue $ Field "hh_no" FTInt32 Nothing Nothing
  -- hashed_id <- getValue $ Field "hashed_id" FTVString Nothing Nothing
  -- error $ show hashed_id
  -- bs <- getRemainingLazyByteString
  -- r <- getRecord recordInfo

  -- V.replicateM (fromIntegral mystery2) $ (getRecord recordInfo)
-- --  error $ show [ show mystery1, show mystery2, show mystery3 ]

--   x <- getRecord recordInfo
--   y <- getRecord recordInfo
--   error $ show y

--   byte <- getValue $ Field "byte" FTByte Nothing Nothing

--   int16 <- getValue $ Field "int16" FTInt16 Nothing Nothing

--   int32 <- getValue $ Field "int32" FTInt32 Nothing Nothing

--   int64 <- getValue $ Field "int64" FTInt64 Nothing Nothing

--   decimal <- getValue $ Field "decimal" FTFixedDecimal (Just 7) Nothing

--   mystery6 <- getWord32le -- 0

--   float <- getValue $ Field "float" FTFloat Nothing Nothing

--   double <- getValue $ Field "double" FTDouble Nothing Nothing

--   string <- getValue $ Field "string" FTString (Just 7) Nothing

--   wstring <- getValue $ Field "wstring "FTWString (Just 2) Nothing

--   let vfield = Field "vstring" FTVString Nothing Nothing
--       vwfield = Field "vwstring" FTVWString Nothing Nothing

--   vstring <- getValue vfield
--   vwstring <- getValue vwfield

--   date <- getValue $ Field "date" FTDate Nothing Nothing
--   time <- getValue $ Field "time" FTTime Nothing Nothing
--   datetime <- getValue $ Field "datetime" FTDateTime Nothing Nothing

--   mystery7 <- getWord32le -- 13

-- --  error $ show [
-- --             show mystery1, show mystery2, show mystery3, show mystery4, show mystery5,
-- --                  show mystery6, show mystery7
-- --            ]

--   error $ show [
--              show byte,
--              show int16,
--              show int32,
--              show int64,
--              show decimal,
--              show float,
--              show double,
--              show string,
--              show wstring,
--              show vstring,
--              show vwstring,
--              show date,
--              show time,
--              show datetime
--             ]




--   vfieldVarBs <- getVariableData
--   vwfieldVarBs <- getVariableData

--   remainder <- getRemainingLazyByteString
--   error $ show remainder
--   error $ show [
-- --             show mystery1,
--              show byte,
-- --             show byteNul,
-- --             show mystery2,
-- --             show short,
-- --             show shortNul,

-- --             show mystery3,
-- --             show int,
-- --             show intNul,
--              show int64,
-- --             show int64Nul
--              show remainder
--             ]
--  -- error $ show [ mystery1, byte, byteNul, mystery2, short, shortNul, remainder ]
getCalgaryRecords (CalgaryRecordInfo recordInfo) = do
  mystery1 <- getWord32le -- 0

  mystery2 <- getWord32le -- 1: Number of records? Matches first word in block index
  mystery3 <- getWord16le -- 0

  -- let (RecordInfo fs) = recordInfo
  -- f1 <- getValue $ fs !! 0
  -- error $ show f1
  -- bs <- getRemainingLazyByteString
  -- error $ show bs

  V.replicateM (fromIntegral mystery2) $ (getRecord recordInfo)

  -- headend_no <- getValue $ Field "headend_no" FTInt32 Nothing Nothing
  -- hh_no <- getValue $ Field "hh_no" FTInt32 Nothing Nothing
  -- hashed_id <- getValue $ Field "hashed_id" FTVString Nothing Nothing
  -- error $ show hashed_id
  -- bs <- getRemainingLazyByteString
  -- r <- getRecord recordInfo

  -- V.replicateM (fromIntegral mystery2) $ (getRecord recordInfo)
-- --  error $ show [ show mystery1, show mystery2, show mystery3 ]

--   x <- getRecord recordInfo
--   y <- getRecord recordInfo
--   error $ show y

--   byte <- getValue $ Field "byte" FTByte Nothing Nothing

--   int16 <- getValue $ Field "int16" FTInt16 Nothing Nothing

--   int32 <- getValue $ Field "int32" FTInt32 Nothing Nothing

--   int64 <- getValue $ Field "int64" FTInt64 Nothing Nothing

--   decimal <- getValue $ Field "decimal" FTFixedDecimal (Just 7) Nothing

--   mystery6 <- getWord32le -- 0

--   float <- getValue $ Field "float" FTFloat Nothing Nothing

--   double <- getValue $ Field "double" FTDouble Nothing Nothing

--   string <- getValue $ Field "string" FTString (Just 7) Nothing

--   wstring <- getValue $ Field "wstring "FTWString (Just 2) Nothing

--   let vfield = Field "vstring" FTVString Nothing Nothing
--       vwfield = Field "vwstring" FTVWString Nothing Nothing

--   vstring <- getValue vfield
--   vwstring <- getValue vwfield

--   date <- getValue $ Field "date" FTDate Nothing Nothing
--   time <- getValue $ Field "time" FTTime Nothing Nothing
--   datetime <- getValue $ Field "datetime" FTDateTime Nothing Nothing

--   mystery7 <- getWord32le -- 13

-- --  error $ show [
-- --             show mystery1, show mystery2, show mystery3, show mystery4, show mystery5,
-- --                  show mystery6, show mystery7
-- --            ]

--   error $ show [
--              show byte,
--              show int16,
--              show int32,
--              show int64,
--              show decimal,
--              show float,
--              show double,
--              show string,
--              show wstring,
--              show vstring,
--              show vwstring,
--              show date,
--              show time,
--              show datetime
--             ]




--   vfieldVarBs <- getVariableData
--   vwfieldVarBs <- getVariableData

--   remainder <- getRemainingLazyByteString
--   error $ show remainder
--   error $ show [
-- --             show mystery1,
--              show byte,
-- --             show byteNul,
-- --             show mystery2,
-- --             show short,
-- --             show shortNul,

-- --             show mystery3,
-- --             show int,
-- --             show intNul,
--              show int64,
-- --             show int64Nul
--              show remainder
--             ]
--  -- error $ show [ mystery1, byte, byteNul, mystery2, short, shortNul, remainder ]