Q:

LDB files reading

I'm looking for the format of the LDB files in order to fetch all the contracts created by my account. 
I read in a post on reddit (https://www.reddit.com/r/ethereum/comments/64hhp1/getting_block_data_from_ldb_files/) that I may want to use the Go API. But I am not able to find an API that does not goes through the RPC-Geth service. This is a problem because:
a) RPC service does not provides this kind of service.
b) Even if it does, it would probably be too slow.
Can anybody point me to an existent solution, or a Go API library, or to explain me what part of Geth accesses the chain files, for being able to develop it myself? 
Thanks a lot!! 

A:

...or a Go API library, or to explain me what part of Geth accesses the
  chain files, for being able to develop it myself?

Have a look at Geth's database.go, which is part of the ethdb package.
For the actual interface that's provided, check interface.go:
type Database interface {
    Put(key []byte, value []byte) error
    Get(key []byte) ([]byte, error)
    Delete(key []byte) error
    Close()
    NewBatch() Batch
}

bench_test.go might be useful for examples of how to use the provided functions.

If you'd like an idea of something to copy, then there's a tutorial of how to read the ldb data using Node.js, here. Clearly you'd have to port the ideas across, but it might help with an understanding of how the data is laid out.

