getting bitcoin address of blk*.dat files I know that getting the address from the blk*.dat files is discussed a lot of times. But I don't get it why? When I have the raw scriptSig I can encode it and get the bitcoin address or not?

E.g. the first block the first transation:

input scriptSig (this value is correct, as defined here: https://en.bitcoin.it/wiki/Genesis_block):

04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73


output scriptSig:

4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac


as written in here: https://en.bitcoin.it/wiki/Genesis_block
the address of the output is: 

1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa


now, how to get from the scriptSig 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac to the address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?

If you try it here: http://gobittest.appspot.com/Address the output is NOT the expected address "1A1....."
First, note that the scriptSig on the genesis block was before addresses were used. The scriptSig there is called p2pk, or pay-to-pub-key. Addresses (the kind starting with a 1) are actually p2pkh, or pay-to-pub-key-hash. You can convert one to the other fairly easily and that's what's going on here.

The actual scriptSig can be parsed like so:

41 = number of bytes in hex of the element (65 bytes)
04...5f = public key
ac = OP_CHECKSIG


Plug in 04...5f into the Public ECDSA key at http://gobittest.appspot.com/Address and you'll see that the address does indeed match.