getRecordInfoText :: Bool -> Get T.Text
getRecordInfoText isNullTerminated = do
  if isNullTerminated
     then do
       bs <- BS.concat . BSL.toChunks <$>
             getRemainingLazyByteString
       when (BS.length bs < 4) $ fail $ "No trailing newline and null: " ++ show bs
       let text = T.init $ T.init $ decodeUtf16LE bs
       return text
     else decodeUtf16LE <$> BS.concat . BSL.toChunks <$> getRemainingLazyByteString
getRecordInfoText :: Bool -> Get T.Text
getRecordInfoText isNullTerminated = do
  if isNullTerminated
     then do
       bs <- BS.concat . BSL.toChunks <$>
             getRemainingLazyByteString
       when (BS.length bs < 4) $ fail $ "No trailing newline and null: " ++ show bs
       let text = T.init $ T.init $ decodeUtf16LE bs
       return text
     else decodeUtf16LE <$> BS.concat . BSL.toChunks <$> getRemainingLazyByteString
getRecordInfoText isNullTerminated = do
  if isNullTerminated
     then do
       bs <- BS.concat . BSL.toChunks <$>
             getRemainingLazyByteString
       when (BS.length bs < 4) $ fail $ "No trailing newline and null: " ++ show bs
       let text = T.init $ T.init $ decodeUtf16LE bs
       return text
     else decodeUtf16LE <$> BS.concat . BSL.toChunks <$> getRemainingLazyByteString