# class KFilterBase

### abstract

Module | kdecore
Namespace |
Class | KFilterBase
Inherits |

This is the base class for compression filters such as gzip and bzip2. It's pretty much internal. Don't use directly, use KFilterDev instead. Internal

### enums

- Result { Ok, End, Error }

enum details

### methods

- KFilterBase ( )

  returns ctor

- KFilterBase (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KFilterBase |

- compress (finish)

  returns KFilterBase.Result
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  finish | bool |

  Internal

- device ( )

  returns QIODevice

  Returns the device on which the filter will work. Returns the device on which the filter will work

- findFilterByFileName (fileName)

  returns KFilterBase
  static

  Argument | Type | Default
  --- | --- | ---
  fileName | QString |

  Call this to create the appropriate filter for the file named fileName.

  fileName - the name of the file to filter Returns the filter for the fileName, or 0 if not found

- findFilterByMimeType (mimeType)

  returns KFilterBase
  static

  Argument | Type | Default
  --- | --- | ---
  mimeType | QString |

  Call this to create the appropriate filter for the mimetype mimeType. For instance application/x-gzip.

  mimeType - the mime type of the file to filter Returns the filter for the mimeType, or 0 if not found

- inBufferAvailable ( )

  returns int
  pure virtual

  Internal

- inBufferEmpty ( )

  returns bool

  Internal

- init (mode)

  returns Nothing
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  mode | int |

  Internal

- mode ( )

  returns int
  pure virtual

  Internal

- outBufferAvailable ( )

  returns int
  pure virtual

  Internal

- outBufferFull ( )

  returns bool

  Internal

- readHeader ( )

  returns bool
  pure virtual

  Internal

- reset ( )

  returns Nothing

  Internal

- setDevice (dev, autodelete)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  dev | QIODevice |
  autodelete | bool | 0

  Sets the device on which the filter will work

  dev - the device on which the filter will work

  autodelete - if true, dev is deleted when the filter is deleted

- setInBuffer (data, size)

  returns Nothing
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  data | char |
  size | uint |

  Internal

- setOutBuffer (data, maxlen)

  returns Nothing
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  data | char |
  maxlen | uint |

  Internal

- terminate ( )

  returns Nothing

  Internal

- uncompress ( )

  returns KFilterBase.Result
  pure virtual

  Internal

- virtual_hook (id, data)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  id | int |
  data | void |

  Virtual hook, used to add new "virtual" functions while maintaining binary compatibility. Unused in this class.

- writeHeader (filename)

  returns bool
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  filename | QByteArray |

  Internal

### enums - detail

- Result { Ok, End, Error }

  Internal

  | Ok | - | - |
  | End | - | - |
  | Error | - | - |