How libre office can read files in custom format

How libre office can read files in custom format?
For example, if I have file in *.cutom_format format, how can I write my own parser implementation for libreoffice?

You can create your own XML filter
‘XML filter settings’, if it is an XML file.

Sorry for late reply. I mean if have some binary format, how can I implement such filter?

Such filters are for xml files. Not for binary files.

I guess you have to start here:
https://wiki.documentfoundation.org/Documentation/DevGuide/Office_Development#Integrating_Import_and_Export_Filters