class_docstr: Package data with crc32 or not.
      
class_docstr_tok: ["Package","data","with","crc32","or","not","."]
docstr: Package data with crc32 and write to disk.
  
  Format of a single record: (little-endian)
  uint64    length
  uint32    masked crc of length
  byte      data[length]
  uint32    masked crc of data
  
  Args:
      data (string or bytes): Data to write to disk.
docstr_tok: ["Package","data","with","crc32","and","write","to","disk",".","Format","of","a","single","record",":","(","little-endian",")","uint64","length","uint32","masked","crc","of","length","byte","data","[","length","]","uint32","masked","crc","of","data","Args",":","data","(","string","or","bytes",")",":","Data","to","write","to","disk","."]
code: def write_crc(self, data):
      """Package data with crc32 and write to disk.
  
      Format of a single record: (little-endian)
      uint64    length
      uint32    masked crc of length
      byte      data[length]
      uint32    masked crc of data
  
      Args:
          data (string or bytes): Data to write to disk.
      """
      header = struct.pack("<Q", len(data))
      header_crc = struct.pack("<I", masked_crc32c(header))
      footer_crc = struct.pack("<I", masked_crc32c(data))
      self._writer.write(header + header_crc + data + footer_crc)
  
imports: from visualdl.io import bfile
  from visualdl.utils.crc32 import masked_crc32c
  from visualdl.proto import record_pb2
  import struct
  import time
  import queue
  import threading
  import os
label_desc: Use image node_id 3 for calling the RecordWriter obj's underlying member method code with example usage: obj.write_crc(data) without return types