class_docstr: TIFF codec for Numcodecs.
docstr: Return TIFF file as bytes.
code: def encode(self, buf):
      """Return TIFF file as bytes."""
      with BytesIO() as fh:
          with TiffWriter(
              fh,
              bigtiff=self.bigtiff,
              byteorder=self.byteorder,
              imagej=self.imagej,
              ome=self.ome,
          ) as tif:
              tif.write(
                  buf,
                  photometric=self.photometric,
                  planarconfig=self.planarconfig,
                  extrasamples=self.extrasamples,
                  volumetric=self.volumetric,
                  tile=self.tile,
                  rowsperstrip=self.rowsperstrip,
                  compression=self.compression,
                  compressionargs=self.compressionargs,
                  predictor=self.predictor,
                  subsampling=self.subsampling,
                  metadata=self.metadata,
                  extratags=self.extratags,
                  truncate=self.truncate,
                  maxworkers=self.maxworkers,
              )
          result = fh.getvalue()
      return result
  
file_path: tifffile/tifffile/numcodecs.py
imports: from __future__ import annotations
  from io import BytesIO
  from typing import TYPE_CHECKING, Any
  from numcodecs import registry
  from numcodecs.abc import Codec
  from .tifffile import TiffFile, TiffWriter
label_desc: Use image node_id 2 for calling the Tiff obj's underlying member method code with example usage: obj.encode(buf) and returns: result